Start a draft
POST
/api/drafts
const url = 'https://forge.example.com/api/drafts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"systemId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","classificationKey":"example","visibility":"example","modelId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","revisionNumber":1,"byHand":false,"example":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”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
byHand
boolean
example
null | string
Responses
Section titled “Responses”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
classificationKey
required
string
visibility
required
string
isValid
required
boolean
errorCount
required
integer | string format: int32
warningCount
required
integer | string format: int32
findings
required
hasContent
required
boolean
updatedAt
required
string format: date-time
messages
required
Array<object>
object
seq
required
integer | string format: int32
role
required
string
text
required
string
activity
required
Array<string>
keptContext
null | string
protection
conversationProtection
origin
string
tier
string
assistantAllowed
boolean
Example
{ "protection": { "revealable": false }, "conversationProtection": { "revealable": false }}default
Section titled “default”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"}