Translate a File

POST
https://libretranslate.com/translate_file

Body

multipart/form-data
filestring<binary>required

File to translate

sourcestringrequired

Source language code or “auto” for auto detection

Exemple
en
targetstringrequired

Target language code

Exemple
es
api_keystring

API key

Exemple
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Response

Translated file

Champs de la réponse application/json
translatedFileUrlstring

Translated file url

400Bad Requesterror-response

Invalid request

Champs de la réponse application/json
errorstring

Error message

403Forbiddenerror-response

Banned

Champs de la réponse application/json
errorstring

Error message

429Too Many Requestserror-slow-down

Slow down

Champs de la réponse application/json
errorstring

Reason for slow down

500Internal Server Errorerror-response

Translation error

Champs de la réponse application/json
errorstring

Error message