Skip to main content
POST
Create a trajectory

Authorizations

X-API-Key
string
header
required

Organization API key

Headers

Idempotency-Key
string

Optional. Without a key, repeated submissions are treated as separate actions. A blank or over-long key is rejected. Reuse this key when retrying a submission; the SDK generates one per call and reuses it across automatic retries.

Required string length: 1 - 256

Body

application/json
agent_id
string | null

Optional agent ID to associate with the trajectory. When omitted for a new trajectory, no agent is assigned. When a Model Endpoint session token references an existing trajectory, omitting this field leaves its existing agent association unchanged.

Required string length: 1 - 64

Response

Successful Response

tid
string
required

ID of the created or existing trajectory; list and detail responses call it trajectory_id.

Minimum string length: 1