v1

Cancel run

Explicitly cancel a running run. Note: closing the SSE connection also cancels the run.

delete/v1/threads/{threadId}/runs/{runId}

Path parameters

threadIdstring required
Example:thr_abc123xyz

Thread ID

runIdstring required
Example:run_xyz789abc

Run ID

Query parameters

userKeystring

Identifier for a user in your system. Required if no bearer token is provided.

Response

Run cancelled

runIdstring required

The run ID that was cancelled

status'cancelled' required

New status after cancellation (always 'cancelled')

Changes