Skip to main content
POST
/
v1
/
translate
Translate Text
curl --request POST \
  --url https://api.voxnexus.ai/v1/translate \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "texts": [
    "第一句",
    "第二句"
  ],
  "target_language": "en",
  "model_id": "vn-translate-basic",
  "source_language": "zh"
}
'
[
  {
    "text": "Hello",
    "detected_source_language": "zh"
  }
]

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 (ISO 639-1, required)

Example:

"en"

model_id
string
required

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

Example:

"vn-translate-basic"

source_language
string

Source language (ISO 639-1). Omit for automatic detection; providing this forces the source language.

Example:

"zh"

Response

Translation successful

text
string
required

Translated text

Example:

"Hello"

detected_source_language
string

Detected or echoed source language (ISO 639-1)

Example:

"zh"