Skip to content

Batch Translate

POST
/batch_translate
curl --request POST \
--url https://example.com/batch_translate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "source_lang": "example", "target_lang": "example", "registered_model_name": "example", "variant": "example", "items": [ { "additionalProperty": "example" } ], "client_request_id": "example", "generation_params": {}, "document_type": "example", "use_pivot": false, "skip_evaluation": false }'

Accept a batch translation request and return immediately with a task_id. Warmup polling, translation, DB logging, and evaluation all happen in a Celery worker. No hard timeout — the worker polls the warmup gateway indefinitely until the model is ready. Poll GET /translation/{task_id} for progress and results.

Media typeapplication/json
BatchTranslationRequest
object
source_lang
required
Source Lang
string
>= 1 characters <= 20 characters
target_lang
required
Target Lang
string
>= 1 characters <= 20 characters
registered_model_name
required
Registered Model Name
string
>= 1 characters <= 200 characters
variant
Any of:
string
<= 64 characters
items
required
Items
Array<object>
>= 1 items
object
key
additional properties
string
client_request_id
Any of:
string
generation_params
Any of:
object
key
additional properties
any
document_type
Any of:
string
use_pivot
Any of:
boolean
skip_evaluation
Any of:
boolean

Successful Response

Media typeapplication/json
TranslationSubmission
object
task_id
required
Task Id

Celery task ID for tracking the translation job

string
run_id
Any of:
string
status
Status

Initial status of the task

string
default: queued
Example
{
"status": "queued"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}