Threads
Cancel a Run
Mark a run as cancelled. The streaming endpoints check this on each yield and bail early. Idempotent: cancelling a run that's already finished or already cancelled returns 200. Used by the CLI's Ctrl+C handler so the server doesn't keep an LLM call alive on its end after the client has given up.
post/threads/{thread_id}/runs/{run_id}/cancel
Path parameters
thread_idstring uuid required
run_idstring required
Headers
authorizationstring nullable
x_session_tokenstring nullable
Response
Successful Response
{"stackTrail":"paths:/threads/{thread_id}/runs/{run_id}/cancel:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}
Changes
No recorded changes to this endpoint across all 1 revision of this API.