Skip to main content
POST
Create an agent and admit its first run

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Transport-level replay protection — any v2 POST may send it (1–255 printable ASCII characters; UUIDs recommended). The first response for a key is recorded and replayed verbatim for retries with the same key + method/path/body for 24 hours; replayed responses carry the Idempotency-Replay: true response header. Reusing a key with a different request — or retrying while the original is still in flight — returns 409 IDEMPOTENCY_ERROR. 5xx responses are never recorded (the retry re-executes).

Required string length: 1 - 255
Pattern: ^[\x21-\x7e]{1,255}$

Body

application/json
prompt
string
required
Required string length: 1 - 10000
name
string

Optional human-readable label. Auto-generated from prompt if absent.

Maximum string length: 80
workspaceId
string<uuid> | null
focusTableIds
string<uuid>[]

Table ids to focus the agent on. When the caller also supplies workspaceId, every id must belong to that workspace. When workspaceId is omitted, the workspace is inferred from the first id.

Maximum array length: 50
attachments
object[]

Bind existing resources to the run. A document is injected as an attached file the agent reads with ctx.loadFile(path) (its current path is re-resolved at run start); a table is merged into focusTableIds. Every attachment must belong to the run's workspace + org, else 400 INVALID_ATTACHMENT before admission.

Maximum array length: 20

A document (injected as an attached file) or a table (merged into focusTableIds).

model
enum<string>

Public model id. Plan-aware default — highest model unlocked on the caller's plan (origami-lite for starter, origami-max for pro+). Resolved server-side to an internal chat-agent model; the response's request.model echoes the public id (origami-lite or origami-max), never an internal name. Legacy aliases origami-fast and origami-mid are still accepted and normalized to origami-lite.

Available options:
origami-lite,
origami-max

Response

Run admitted; agent work is in the background.

agent
object
required
run
object
required
workspace
object
required