Batches

Cancel a batch

Stop a running batch.

POST
/v1/batches/{batch}/cancel

Stop a running batch. Idempotent: a batch that has already finished answers 200 with its real status rather than an error, so read status. Cancel has its own rate limit of 60 requests per minute per token, separate from the general limit, so polling a batch never uses up the budget you need to stop it.

Authorization

deployToken
headerAuthorizationBearer <token>

A project deploy token, minted in the console under Settings, Developer, API tokens. Send the whole value, including the numeric prefix before the |. A token carries a set of abilities (push, pull, manage, read, write) and each operation requires one of them. Tokens do not inherit from each other: a manage token cannot read the glossary unless it also has read.

Path Parameters

batch*integer

The batch id, as returned by POST /v1/translate, GET /v1/batches or a push.

Response Body

The batch as it stands after the cancel.

application/json
  1. response

A translation run.

id?integer
status?string

pending and processing are active; the other four are final. Only one batch per project is active at a time.

Value in"pending""processing""completed""completed_with_errors""failed""cancelled"
trigger?string

What started the run.

Value in"manual_missing""manual_selected""auto_edit""language_added""retry_failed""push"
total?integer

Key and locale pairs sent for translation.

completed?integer

Pairs the run finished processing.

failed?integer

Pairs that failed.

skipped?integer

Pairs the run covered and will not write. A translation you have edited or reviewed is never overwritten by AI; such pairs are counted here.

skipped_reasons?|

Skipped pairs by reason. human_value_stands: a person's translation is in place. human_value_stale: a person's translation is in place and the source has changed since, so only a person can update it. source_moved: the source changed while the run was in progress; running again fixes it.

tm_served?integer

Pairs answered from translation memory. They are not part of total.

language_breakdown?|

Pairs per target locale.

started_at?|
Formatdate-time
finished_at?|
Formatdate-time
curl -X POST 'https://api.transglot.ai/v1/batches/0/cancel'
{  "id": 4821,  "status": "cancelled",  "trigger": "manual_missing",  "total": 240,  "completed": 96,  "failed": 0,  "skipped": 0,  "skipped_reasons": null,  "tm_served": 37,  "language_breakdown": {    "fr": 120,    "de": 120  },  "started_at": "2026-10-12T09:39:13+00:00",  "finished_at": "2026-10-12T09:40:02+00:00"}