POST
Stop the running turn
Request · Response · Guide: Minto
The stop is a request, not a completion. The agent keeps working for about a second while it checkpoints, then ends the run itself — so the answer it had produced so far is kept, and the time and cost already incurred are still billed. Poll the job to see the run reach STOPPED.A stop always races the run it is ending: if the run finished first, the response reports stop_requested false and nothing was forwarded.The session stays open. The next turn continues the conversation from the checkpoint the agent wrote, so do not start a new session.

Authorizations

x-api-key
string
header
required

API key for authentication

Headers

Idempotency-Key
string
required

Required opaque key (max 255 chars, UUIDv4 recommended) making this request idempotent for 24h: a retry with the same key and body replays the original response with Idempotent-Replayed: true. Omitting it is a 400; reusing a key with a different body is a 422; retrying while the first request is still in flight is a 409.

Path Parameters

session_id
string
required

Session whose run to stop.

Response

Stop request accepted, or reported as unnecessary when no run was live.

session_id
string
required
Example:

"665f1c2e8a1b4c0012ab34cd"

stop_requested
boolean
required

Whether a stop was forwarded to the agent.

False means there was nothing live to stop — the run had already finished. That is a normal answer, not an error: a stop always races the run it is trying to end.

Example:

true

run_status
enum<string> | null

Status of the run at the moment the stop was requested — deliberately unchanged. The run is still going; it reaches STOPPED only once the agent confirms on its own event stream.

Available options:
QUEUED,
RUNNING,
COMPLETED,
FAILED,
STOPPED,
STALE
Example:

"RUNNING"

job_id
string | null

Job handle for the run being stopped. Null when the turn was asked in the app rather than through this API.

Example:

"sajob_9f2c1a4b7e8d4c1fa0b3"

poll_url
string<uri-reference> | null

URL of GET /v1/jobs/{job_id} — poll it until the job reports STOPPED (or the status the run reached on its own).