Skip to content

Batch Translate Lite

POST
/batch_translate_lite
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.

Media typeapplication/json
BatchTranslateLiteRequest
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

Each dict must have a ‘source’ key

Array<object>
>= 1 items
object
key
additional properties
string
generation_params
Any of:
object
key
additional properties
any
document_type
Any of:
string
use_pivot
Any of:
boolean
client_request_id
Any of:
string

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": {}
}
]
}