Skip to main content
POST
/
runs
/
cancel
Cancel Runs
curl --request POST \
  --url https://api.example.com/runs/cancel \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "pending",
  "thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "run_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
'
{
  "detail": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.langchain.com/llms.txt

Use this file to discover all available pages before exploring further.

Query Parameters

action
enum<string>
default:interrupt

Action to take when cancelling the run. Possible values are interrupt or rollback. interrupt will simply cancel the run. rollback will cancel the run and delete the run and associated checkpoints afterwards.

Available options:
interrupt,
rollback

Body

application/json

Payload for cancelling runs.

status
enum<string>
required

Filter runs by status to cancel. Must be one of 'pending', 'running', or 'all'.

Available options:
pending,
running,
all
thread_id
string<uuid>

The ID of the thread containing runs to cancel.

run_ids
string<uuid>[]

List of run IDs to cancel.

Response

Success - Runs cancelled