Skip to main content
POST
Translate text between languages

Body

application/json

Translation request

text
string[]
required

Array of text strings to translate

Example:
model
string
required

Translation model ID

Example:

"opus-en-es"

target_language
string
required

Target language code (ISO 639-1)

Example:

"es"

source_language
string

Source language code (ISO 639-1). If omitted, may be auto-detected.

Example:

"en"

parameters
object

Optional parameters for translation

Example:

Response

Translation successful

Translation result

translations
object[]
required

Array of translation results (same order as input)