Cancel Job V1
Cancel a queued or running job. Mirrors the JWT-API behavior: sets the Redis cancel sentinel before flipping the DB row, so even an in-flight worker observes…
POST
Cancel a queued or running job.
Mirrors the JWT-API behavior: sets the Redis cancel sentinel before
flipping the DB row, so even an in-flight worker observes the signal
on its next iteration checkpoint and stops billing tokens.
Optional body
{'reason': '...'} is stamped on job.error so audit
trails show why a cancel happened. Without a body, the default
'Cancelled by user' is used (back-compat for clients that POST with
no payload).
Path parameters
string (uuid)
required
Request body
JSON body of typeCancelJobRequest,null.
Response
JobStatusResponse
string
required
Job UUID.
string
required
Current status: queued, running, succeeded, failed, cancelled, awaiting_approval.
string
required
Agent type / template that was used.
string,null
Pipe-separated final assistant text. Populated when the job reaches a terminal state. Truncated to ≈5 segments × 280 chars.
string,null
Human-readable error message when status is ‘failed’ or ‘cancelled’.
integer,null
Cumulative input tokens consumed.
integer,null
Cumulative output tokens generated.
number,null
Cumulative billable cost. Priced at the job’s selected model rate (not the deployment default).
string
required
ISO 8601 UTC timestamp.
string
required
ISO 8601 UTC timestamp; refreshed on every iteration.