Architect

Run an Architect turn (Chat Completions)

OpenAI Chat Completions over one turn of the Architect on a project. The turn builds and edits the project’s scene. The reply is content; the readable reasoning (the model’s thinking and one line per step) is reasoning_content; a turn that changed the scene is saved as a named version, cited as a url_citation in annotations and named in metadata.pascal_version*. The last user message is the request, with its image_url and file parts; earlier messages the project’s conversation already holds are not repeated, and system and developer messages become instructions for this turn. With stream: true the response is a text/event-stream of chat.completion.chunk events (delta.reasoning_content, delta.content, the annotation on the last chunk, a usage chunk with stream_options.include_usage) ending with data: [DONE], with : keepalive comments during silences. A turn can run for minutes; closing the connection stops it. Without stream, the headers leave within 15 s and spaces keep the connection open until the JSON body, so a turn that fails after that answers 200 with the error as the body. A question the Architect asks is the reply, and the next request answers it: 1, 2… picks an option. metadata.commit_message names the version the turn saves; metadata.pascal_max_credits caps the credits the turn may spend, and a turn that reaches it ends with finish_reason: "length". Errors carry x-should-retry: false: a turn that started may already have edited the scene. A turn needs at least one credit in the project’s credit pool.

post/api/v1/chat/completions

Request

  • Base URL: https://editor.pascal.app
  • URL: https://editor.pascal.app/api/v1/chat/completions
  • Auth: HTTP bearer

Headers

X-Pascal-Projectstring

Id of the project the Architect works on; it must be editable with the key. Required unless metadata.project_id is sent (for Responses, previous_response_id also supplies it).

Request body

model'architect' | 'architect-low' | 'architect-medium' | 'architect-high' | 'architect-pro' required

The Architect, at a reasoning effort: architect uses reasoning_effort (default medium); a suffix fixes it.

streamboolean

Stream chat.completion.chunk events as server-sent events.

reasoning_effort'minimal' | 'low' | 'medium' | 'high' | 'pro'

Example request

{
  "metadata": {
    "pascal_max_credits": "50"
  }
}

Response

Completion, or a server-sent event stream of chat.completion.chunk events when stream is true

idstring required
object'chat.completion' required
createdinteger required
modelstring required
metadataArchitectPascalMetadata

The turn’s outcome, beside the caller’s own string metadata: pascal_project_id; pascal_version, pascal_version_label and pascal_version_url when the turn saved a version; pascal_waiting: "question" when the next request answers the Architect’s question.

Changes

No recorded changes to this operation across all 1 revision of this API.