Skip to content

Save the draft as a model or revision

POST
/api/drafts/{id}/save
curl --request POST \
--url https://forge.example.com/api/drafts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/save \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "note": "example", "overwrite": false }'

Deletes the draft once saved, and keeps what the assistant recorded of the conversation as the model’s context for the next draft. overwrite saves even though the model has a newer revision than the one the draft started from, or its context was changed after the assistant read it.

id
required
string format: uuid
Media typeapplication/json
object
note
null | string
overwrite
boolean

The saved model or revision, as creating a model or adding a revision answers it.

Media typeapplication/json
string

Example generated

example

A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.

Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}