API de tâche de traduction
Texte traduit
/v1/translation/translateTextsTraduire le texte et renvoyer simultanément les résultats de traduction.
Exemple
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}'Paramètres de requête
| Paramètres | Type | Par défaut | Description | Exemple | 
|---|---|---|---|---|
| *texts | String[] | - | Texte à traduire | - | 
| *fromLang | String | - | 
 | - | 
| *toLang | String | - | 
 | - | 
| model | String | - | 
 | - | 
| fileDescription | String | - | Description du document : améliorer la qualité de la traduction en fournissant des informations supplémentaires, par exemple en ajoutant des informations contextuelles supplémentaires sur le document et d'autres exigences de traduction, etc. | - | 
Réponse
| Paramètres | Type | Par défaut | Description | Exemple | 
|---|---|---|---|---|
| taskId | String | - | ID de tâche | - | 
| translatedTexts | String[] | - | Texte traduit | - | 
| price | Integer | - | Nombre total de crédits requis pour la traduction | - | 
| usedCredits | Integer | - | Nombre de crédits utilisés par la tâche de traduction | - |