Cancel a translation
Stops within one task. Work already completed is charged (credits_charged in the response, because translation that ran has a real cost); the rest of the reservation is released. The batch lands in cancelled, a terminal status of its own since 2026-09-02. It used to be reported as failed carrying error.code: "cancelled", so any count of failures silently included deliberate stops; a cancelled batch now returns no error object at all.
POST/v1/batches/{batch_id}/cancel
Requires batches:write. Stops within one task rather than instantly, because a task in flight is finished rather than abandoned half-written.
What you are charged
Work already completed is charged, and the response says how much in credits_charged. The unused part of the reservation is released back to the balance.
This is not a refund policy so much as an accounting fact: translation that ran consumed model capacity. Cancelling early costs less, cancelling near the end costs nearly the full amount.
Where the translation lands
The batch ends in cancelled, which is a terminal status of its own and not a kind of failure. error.code is also "cancelled", so a caller that only reads the error still learns why.
That distinction matters when you are polling. cancelled means nothing went wrong: someone stopped the work on purpose. failed means the translation could not finish and error.code says what broke. Treat both as terminal and stop polling, but only failed is worth retrying or alerting on.
Anything the translation had already produced is not downloadable. A partial result is not a translated file, and returning one would be worse than returning nothing.
Response
Cancel a running translation
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_credits
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required, file_retention_expired
errorobjectrequiredrequest_idstringrequiredPossible codes: batch_not_found, glossary_not_found, resource_not_found
errorobjectrequiredrequest_idstringrequiredPossible codes: glossary_already_exists, result_not_ready, batch_not_editable, no_plan_yet, batch_not_awaiting_approval
errorobjectrequiredrequest_idstringrequiredPossible codes: file_expired
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large, file_too_large, result_too_large
errorobjectrequiredrequest_idstringrequiredPossible codes: language_not_supported, invalid_language_pair, glossary_term_limit_reached, glossary_limit_reached, invalid_glossary_terms, unsupported_format, file_fetch_failed, plan_invalid
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequiredPossible codes: service_unavailable
errorobjectrequiredrequest_idstringrequired