Skip to main content
POST
Cancelling a Job
Using the API directly is not recommended for most users. Instead, we recommend using the Python SDK.
Cancel a batch inference job by its job_id.

Request Parameters

job_id
string
required
The job_id returned when you submitted the batch inference job

Headers

Authorization
string
required
Your Sutro API key using Key authentication scheme.Format: Key YOUR_API_KEYExample: Authorization: Key sk_live_abc123...

Response

Returns the cancellation status of the job.
cancelled
boolean
True if the job was cancelled, False otherwise
message
string
Verbose message describing the job’s cancellation status

Code Examples

Notes

  • Jobs can only be cancelled if they are in a cancellable state (e.g., pending, submitted, starting, or running)
  • Jobs that have already completed, failed, or been previously cancelled cannot be cancelled
  • The cancellation is asynchronous - the job may take a moment to fully stop after receiving the cancellation request