Skip to main content
POST
Create a thread

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string

Identifies one submission attempt. Retrying with the same key returns the original admission with Idempotent-Replayed: true. Use a new key after changing any request field.

Path Parameters

agentId
string
required

Body

application/json
content
object[]
required

Ordered message content, bounded to 512 KiB of encoded JSON. At most 20 image blocks and 20 file blocks are permitted; image IDs and namespace/key file references must be unique within the message.

Required array length: 1 - 40 elements
maxCost
number<double>

Optional USD cost cap for the thread.

Required range: x >= 0
model
string

Optional exact model id allowed by the target agent profile, including matrices/auto; wildcard selectors are not accepted. Defaults to the profile's preferred model.

Pattern: ^[^*]+$

Response

Accepted thread submission or parked agent operation.

mode
enum<string>
required

Effective admission mode after runtime normalization.

Available options:
queue,
steer,
interrupt
status
enum<string>
required
Available options:
running,
awaiting,
idle,
failed,
cancelled
threadId
string
required
turnId
string
required