Skip to main content
POST
Confirm your deployment before running this request. This page describes an API contract; a published reference does not establish hosted availability. Check the dated host report and obtain your deployment URL and credentials. Replace the example host if your provisioned service uses a different URL.
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

CancelJobRequest,null
string,null
Free-form reason stamped on job.error for audit. Cap is 500 chars; over-cap reasons return 422 (no silent truncation). Whitespace-only is normalized to no reason and the default 'Cancelled by user' audit string is used. Maximum length: 500.

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.

Status codes

Using this contract

Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.
Last modified on September 21, 2026