Translate
POST https://api.lelapa.ai/v1/translate/process.
The Translation endpoint takes the provided text and translates it from the source language to the target language.
We recommend sending less than 100 words at a time to ensure optimal performance.
BODY PARAMS
input_text string required.
This parameter represents the text input that will be translated from one language to another. It is required for the endpoint to function properly. The input_text should be provided as a string and contains the text to be processed by the Translation model.
source_lang string required.
This parameter represents the source language of the text that will be translated. It is required for the endpoint to function properly. The source_lang should be provided as a string.
target_lang string required.
This parameter represents the target language to which the text will be translated. It is required for the endpoint to function properly. The target_lang should be provided as a string.
HEADERS
X-CLIENT-TOKEN string required.
Represents the authentication token required for accessing the API. This header ensures that only authorized clients can make requests to the endpoint.
Language Selection
You can use the following values for source_lang and target_lang parameter:
- Northern Sotho = "nso_Latn"
- Afrikaans = "afr_Latn"
- Southern Sotho = "sot_Latn"
- Swati = "ssw_Latn"
- Tsonga = "tso_Latn"
- Tswana = "tsn_Latn"
- Xhosa = "xho_Latn"
- Zulu = "zul_Latn"
- English = "eng_Latn"
- Swahili = "swh_Latn"
EXAMPLES
Code
RESPONSES
🟢 200 OK
Code
RESPONSE BODY PARAMS
| Object |
|---|
| translation array required. An array containing the translated text. |
| translated_text string required. Contains the translated text. |

