Skip to main content
POST
Cancel Runs

Query Parameters

action
enum<string>
default:interrupt

Accepted for compatibility: 'cancel' and 'interrupt' both stop the run immediately and finalize it as interrupted.

Available options:
cancel,
interrupt

Body

application/json

Selector for POST /runs/cancel: a status filter, or thread_id plus run_ids.

status
enum<string> | null

Cancel every active run of the caller in this status. 'all' means pending and running.

Available options:
pending,
running,
all
thread_id
string | null

Thread that owns the runs listed in run_ids.

run_ids
string[] | null

Runs to cancel; requires thread_id.

Response

Successful Response