Batch Translate Lite
POST
/batch_translate_lite
const url = 'https://example.com/batch_translate_lite';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"}],"generation_params":{},"document_type":"example","use_pivot":false,"client_request_id":"example"}'};
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_lite \ --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" } ], "generation_params": {}, "document_type": "example", "use_pivot": false, "client_request_id": "example" }'Lightweight batch translation — no DB writes, no MLflow, no scoring.
Accepts a list of items (each with a “source” key) and returns immediately with a task_id. Poll GET /translation_lite/{task_id} for progressive results: each poll returns all translations completed so far.
Supports pivot translation via use_pivot=True.
Idempotency: if client_request_id is provided, duplicate submissions return the existing task_id instead of spawning a second Celery task.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
BatchTranslateLiteRequest
object
source_lang
required
Source Lang
string
target_lang
required
Target Lang
string
registered_model_name
required
Registered Model Name
string
items
required
Items
Each dict must have a ‘source’ key
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": {} } ]}