Skip to main content
POST
/
runs
Stateless Create Run
curl --request POST \
  --url https://api.example.com/runs \
  --header 'Content-Type: application/json' \
  --data '
{
  "assistant_id": "<string>",
  "input": {},
  "config": {},
  "context": {},
  "checkpoint": {},
  "stream": false,
  "stream_mode": "<string>",
  "on_disconnect": "<string>",
  "on_completion": "delete",
  "multitask_strategy": "<string>",
  "command": {},
  "interrupt_before": "<string>",
  "interrupt_after": "<string>",
  "stream_subgraphs": false,
  "metadata": {}
}
'
{
  "run_id": "<string>",
  "thread_id": "<string>",
  "assistant_id": "<string>",
  "input": {},
  "user_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "status": "pending",
  "output": {},
  "error_message": "<string>",
  "config": {},
  "context": {}
}

Body

application/json

Request model for creating runs

assistant_id
string
required

Assistant to execute

input
Input · object

Input data for the run. Optional when resuming from a checkpoint.

config
Config · object

Execution config

context
Context · object

Execution context

checkpoint
Checkpoint · object

Checkpoint configuration (e.g., {'checkpoint_id': '...', 'checkpoint_ns': ''})

stream
boolean
default:false

Enable streaming response

stream_mode

Requested stream mode(s)

on_disconnect
string | null

Behavior on client disconnect: 'cancel' (default) or 'continue'.

on_completion
enum<string> | null

Behavior after stateless run completes: 'delete' (default) removes the ephemeral thread, 'keep' preserves it.

Available options:
delete,
keep
multitask_strategy
string | null

Strategy for handling concurrent runs on same thread: 'reject', 'interrupt', 'rollback', or 'enqueue'.

command
Command · object

Command for resuming interrupted runs with state updates or navigation

interrupt_before

Nodes to interrupt immediately before they get executed. Use '*' for all nodes.

interrupt_after

Nodes to interrupt immediately after they get executed. Use '*' for all nodes.

stream_subgraphs
boolean | null
default:false

Whether to include subgraph events in streaming. When True, includes events from all subgraphs. When False (default when None), excludes subgraph events. Defaults to False for backwards compatibility.

metadata
Metadata · object

Request metadata (e.g., from_studio flag)

Response

Successful Response

Run entity model

Status values: pending, running, error, success, timeout, interrupted

run_id
string
required

Unique identifier for the run.

thread_id
string
required

Thread this run belongs to.

assistant_id
string
required

Assistant that is executing this run.

input
Input · object
required

Input data provided to the run.

user_id
string
required

Identifier of the user who owns this run.

created_at
string<date-time>
required

Timestamp when the run was created.

updated_at
string<date-time>
required

Timestamp when the run was last updated.

status
string
default:pending

Current run status: pending, running, error, success, timeout, or interrupted.

output
Output · object

Final output produced by the run, or null if not yet complete.

error_message
string | null

Error message if the run failed.

config
Config · object

Configuration passed to the graph at runtime.

context
Context · object

Context variables available during execution.