Skip to main content
POST
/
models
/
v2
/
Helsinki-NLP
/
opus-mt-en-zh
translation
curl --request POST \
  --url https://api.bytez.com/models/v2/Helsinki-NLP/opus-mt-en-zh \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "Hello",
  "stream": true
}
'
{
  "error": "<string>",
  "output": "Bonjour"
}

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for translation models

text
string
required

The input text

Example:

"Hello"

stream
boolean

Enable text streaming.

Response

Successful translation response.

error
string | null
required

Null on success; otherwise an error message.

output
string
required

Successful response with the translated text

Example:

"Bonjour"