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 model for Sunflower-backed text translation.

Languages may be given as ISO 639-3 codes (e.g. lug) or full names (e.g. Luganda). This schema stores the raw value as-is; the router normalizes case and validates membership in the supported language set via resolve_language (returning a 400 with the supported list for anything unsupported).

Attributes: source_language: Optional source language; auto-detected when omitted. target_language: The target language (code or full name). text: The text to translate (min 1 character, whitespace stripped).

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

Response model for translation worker API calls.

This model wraps the translation worker output with metadata about the job execution.

Attributes: delayTime: Time spent waiting in queue (ms). executionTime: Time spent executing the job (ms). id: Unique job identifier. output: The translation output data. status: Job status (e.g., "COMPLETED", "FAILED"). workerId: Identifier of the worker that processed the job.

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