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

Esempio
en
targetstringrequired

Target language code

Esempio
es
api_keystring

API key

Esempio
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Response

Translated file

Campi della risposta application/json
translatedFileUrlstring

Translated file url

400Bad Requesterror-response

Invalid request

Campi della risposta application/json
errorstring

Error message

403Forbiddenerror-response

Banned

Campi della risposta application/json
errorstring

Error message

429Too Many Requestserror-slow-down

Slow down

Campi della risposta application/json
errorstring

Reason for slow down

500Internal Server Errorerror-response

Translation error

Campi della risposta application/json
errorstring

Error message