Translation Task API
Translation text
/v1/translation/translateTextsTranslate text and return translation results synchronously.
Example
curl
1curl -X POST 'https://dltranslator.com/api/v1/translation/translateTexts' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "texts": "[value]",
6 "fromLang": "[string]",
7 "toLang": "[string]"
8}'Request Parameters
| Parameters | Type | Default | Description | Example |
|---|---|---|---|---|
| *texts | String[] | - | Text to be translated | - |
| *fromLang | String | - |
| - |
| *toLang | String | - |
| - |
| model | String | - |
| - |
| fileDescription | String | - | Document description. Improve translation quality by providing additional information, such as extra document background information and other translation requirements. | - |
Response
| Parameters | Type | Default | Description | Example |
|---|---|---|---|---|
| taskId | String | - | Task ID | - |
| translatedTexts | String[] | - | Translated text | - |
| price | Integer | - | Total Credits required for the complete translation | - |
| usedCredits | Integer | - | Number of credits used by the translation task | - |