Skip to content

Start a draft

POST
/api/drafts
curl --request POST \
--url https://forge.example.com/api/drafts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "systemId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "classificationKey": "example", "visibility": "example", "modelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "revisionNumber": 1, "byHand": false, "example": "example" }'

Of a new model (systemId, name, classificationKey, visibility), or from a revision of a model you can see (modelId, revisionNumber). Answers 403 when the classification does not let an AI see the model. With byHand, the draft is to be changed by hand in a form, with no assistant: the classification’s switch for the assistant is not asked, and the draft’s origin is hand. With byHand and example (a name from /api/drafts/examples), a new model’s draft begins as that example of the engine’s.

Media typeapplication/json
object
systemId
null | string format: uuid
name
null | string
classificationKey
null | string
visibility
null | string
modelId
null | string format: uuid
revisionNumber
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
byHand
boolean
example
null | string

OK

Media typeapplication/json
object
id
required
string format: uuid
name
required
string
systemId
required
string format: uuid
modelId
required
null | string format: uuid
baseRevisionNumber
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
classificationKey
required
string
visibility
required
string
isValid
required
boolean
errorCount
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
warningCount
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
findings
required
hasContent
required
boolean
updatedAt
required
string format: date-time
messages
required
Array<object>
object
seq
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
role
required
string
text
required
string
activity
required
Array<string>
keptContext
null | string
protection
One of:
null
conversationProtection
One of:
null
origin
string
tier
string
importReport
One of:
null
assistantAllowed
boolean

Example

{
"protection": {
"revealable": false
},
"conversationProtection": {
"revealable": false
}
}

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"
}