Skip to main content
POST
Translate Text

Authorizations

X-Api-Key
string
header
required

Authenticate using X-Api-Key header

Body

application/json

Text translation request

texts
string[]
required

Texts to translate (max 100 items / 50,000 characters)

Example:
target_language
string
required

Target language code (required). Same format as source_language; see GET /v1/models/{model_id} → translate_capability.target_languages for the codes a model supports.

Example:

"en"

model_id
string
required

Translation model ID (e.g. vn-translate-basic).

Example:

"vn-translate-basic"

source_language
string

Source language code. Omit (or pass auto) for automatic detection; providing this forces the source language. VoxNexus translation language codes use the language[-Script] form without a region: the shortest ISO 639 language code, plus an ISO 15924 script code when needed, e.g. en, ar, hi-Latn, zh-Hans, zh-Hant. The script is omitted when it is the language's default (en, ja) and always written for multi-script languages (zh-Hans, sr-Cyrl, mni-Mtei, mni-Beng). Other common forms are accepted and normalized, case-insensitively and with - or _: ISO 639-3 (eng), <ISO 639-3>_<Script> (eng_Latn, zho_Hans) and BCP 47 tags with a region (zh-TW, pt-BR). A region subtag only selects the script and is then dropped (zh-TW → zh-Hant, pt-BR → pt).

Example:

"zh-Hans"

Response

Translation successful

text
string
required

Translated text

Example:

"Hello"

detected_source_language
string

When source_language is specified (not blank or auto), it is echoed unchanged (e.g. en, EN_us) and takes precedence over the detected language. Otherwise the detected language is returned as a language[-Script] code (e.g. zh-Hans, en).

Example:

"zh-Hans"