Skip to main content
POST
Translate

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Request body for Sunflower-backed text translation.

Languages may be given as ISO 639-3 codes (e.g. lug) or full names (e.g. Luganda), case-insensitively. Unsupported languages are rejected with a 400 that lists the supported set.

target_language
string
required

Target language ISO code or full name

text
string
required

The text to translate

Minimum string length: 1
source_language
string | null

Source language ISO code or full name (optional; auto-detected when omitted)

Response

Successful Response

Translation worker output wrapped with job-execution metadata.

delayTime
integer | null

Time spent waiting in queue (ms)

executionTime
integer | null

Time spent executing the job (ms)

id
string | null

Unique job identifier

output
WorkerTranslationOutput · object | null

The translation output data

status
string | null

Job status (e.g., COMPLETED, FAILED)

workerId
string | null

Identifier of the worker that processed the job

usage
TokenUsage · object | null

Token usage for the Sunflower translation call