Skip to main content
POST
Cancel Run Endpoint

Path Parameters

thread_id
string
required
run_id
string
required

Query Parameters

wait
integer
default:0

Set to 1 to wait up to 10 seconds for the run task to settle before returning.

Required range: 0 <= x <= 1
action
enum<string>
default:cancel

Cancellation strategy: 'cancel' for hard cancel, 'interrupt' for cooperative interrupt.

Available options:
cancel,
interrupt

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.

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.

input
Input · object | null

Input data provided to the run. None for checkpoint-only resume.

output
Output · object | null

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 | null

Configuration passed to the graph at runtime.

context
Context · object | null

Context variables available during execution.