Cancel a running turn

Stops an in-progress agent turn and marks it interrupted

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Aborts an in-flight turn and marks it INTERRUPTED. Like user_input, this is a side-channel call against a turn that is already streaming.

{threadResponseId} is the id from that turn's init frame.

Basic Usage

{
  "projectId": 1
}
{
  "success": true
}

The open stream then ends:

event: done
data: {"session_id":"9c537507-9cec-46ed-b877-07bfa6322bed","trace_id":"f218b1f7-4623-4a56-8b66-18d544797b20","version":1}

Afterwards Get a turn's status reports INTERRUPTED, and Get a turn's result returns the events the turn had already emitted.

When you don't need this

Dropping the HTTP connection also stops the turn — the server tears down the run and records it as INTERRUPTED rather than letting it finish and billing you for an answer nobody received. Call this endpoint when you want to stop a turn without closing the stream, for example to show the user a clean "cancelled" state before reusing the connection.

Error handling

StatusWhen
401Missing or invalid API key.
404The turn does not exist.
🔗

Learn more


Path Params
integer
required

The turn id produced by the originating agent_ask.

Body Params
integer
required
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json