Translate
Translate
Translate text from a source language to a target language in a single request.
Code
New here? Get an API key first
Every request needs an API key in the X-CLIENT-TOKEN header. Sign up at
vulavula.lelapa.ai, generate a key, and
you're set — every account includes 100 free API calls per month. See
Authentication for the full walkthrough.
We recommend sending fewer than 100 words at a time to ensure optimal performance.
Request
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-CLIENT-TOKEN | string | Yes | Your API key — see Authentication |
Content-Type | string | Yes | Must be set to application/json |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input_text | string | Yes | The text to translate |
source_lang | string | Yes | Language code of the input text |
target_lang | string | Yes | Language code to translate the text into |
Supported language codes
Use these values for source_lang and target_lang:
| Code | Language |
|---|---|
eng_Latn | English |
zul_Latn | Zulu |
xho_Latn | Xhosa |
afr_Latn | Afrikaans |
nso_Latn | Northern Sotho |
sot_Latn | Southern Sotho |
ssw_Latn | Swati |
tso_Latn | Tsonga |
tsn_Latn | Tswana |
swh_Latn | Swahili |
See Language Support for the current status of every language pair.
Example request
Code
Response
A successful request returns 200 OK:
Code
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for this translation |
translation | array | Array of translation results |
translation[].translated_text | string | The translated text |
Errors
| Status | Meaning |
|---|---|
400 Bad Request | The request was malformed or contained invalid data |
401 Unauthorized | The client token is missing or invalid |
500 Internal Server Error | An unexpected error occurred on the server |
Next steps
- Transcribe audio first with the Speech-to-Text API, then translate the transcript
- See the Translate model card for model details
- Browse the full API Reference
Last modified on

