/v1/batches/{batch_id}/cancelCancel a Batch Inference Job
Requests cancellation of a batch job. The job transitions to cancelling and, once in-flight requests drain, to cancelled. Jobs already in a terminal state (completed, failed, expired, cancelled) cannot be cancelled and return 409 Conflict. Cancellation is also rejected with 409 Conflict while the job has not yet been submitted to the upstream provider — there is nothing to cancel until the provider batch id is assigned.
Partial results produced before cancellation remain available via GET /v1/batches/{batch_id}/results.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
A 401 is returned: Authentication failed due to invalid credentials. A 403 is returned: The authenticated principal does not have permission to perform this action on the requested resource. A 404 is returned: The resource was not found. A 409 is returned: The request could not be completed due to a conflict. A 429 is returned: The API rate limit has been exceeded. A 500 is returned: There was a server error. Any other status is an error: There was an unexpected error.