Batch Translate
POST
/batch_translate
const url = 'https://example.com/batch_translate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
BatchTranslationRequest
object
source_lang
required
Source Lang
string
target_lang
required
Target Lang
string
registered_model_name
required
Registered Model Name
string
items
required
Items
Array<object>
object
key
additional properties
string
Responses
Section titled “Responses”Successful Response
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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": {} } ]}