iTranslate for iOS
(484K)
Get the app
iTranslate for Android
3.8
(396K)
Get the app
iTranslate

API Documentation

The iTranslate Translation API is a highly responsive and state-of-the-art Neural Machine Translation API that can dynamically translate text between many languages.

Get Access

URL

https://dev-api.itranslate.com/translation/v2/

Method

POST

Request Parameters

Headers

{
    "Authorization": "Bearer 603160b7-cee1-4c13-bcd7-37420b55211d",
    "Content-Type": "application/json" 
}

POST Request Body (JSON)

{
    "
source": {"dialect": SOURCE_DIALECT, "text": TEXT},
    "
target": {"dialect": TARGET_DIALECT}
}
SOURCE_DIALECT
source language specifier (see "Languages")
TEXT
the text to translate, in the source language
TARGET_DIALECT
target language specifier (see “Languages")

Response (JSON)

{
    "
source": {"dialect": SOURCE_DIALECT, "text": TEXT, "detected": DETECTED_LANGUAGE},
    "
target": {"dialect": TARGET_DIALECT, "text": TRANSLATION},
    "
times": {"total_time": PROCESSING_TIME}
}

Response Values

DETECTED_LANGUAGE
the detected language key (see "Languages") if SOURCE_DIALECT was set to auto (otherwise detected field is not present in the response)
TRANSLATION
the result of the translation
PROCESSING_TIME
the time in seconds it took the server to process the request

Errors

400 Bad Request
Malformed request JSON
401 Unauthorized
invalid API key
403 Forbidden
Language not supported

Example

Example Curl Command

Copied!

curl --location --request POST 'https://dev-api.itranslate.com/translation/v2/' \
--header 'Authorization: Bearer 603160b7-cee1-4c13-bcd7-37420b55211d' \
--header 'Content-Type: application/json' \
--data-raw '{    
   "source": {"dialect": "en", "text": "Hello World"},
   "target": {"dialect": "es"}
}'

Copy

Request

{
    "
source": {"dialect": "de", "text": "Wie geht es dir?"},
    "
target": {"dialect": "en"}
}

Response

{
    "
source": {"dialect": "de", "text": "Wie geht es dir?"},
    "
target": {"dialect": "en", "text": "How are you?"},
    "
times": {"total_time": 0.020}
}

Languages

auto
Detect language automatically
ja
Japanese
af
Afrikaans
ko
Korean
sq
Albanian
lv
Latvian
ar
Arabic
lt
Lithuanian
az
Azerbaijani
mk
Macedonian
bn
Bengali
mn
Mongolian
bs
Bosnian
ms
Malay
bg
Bulgarian
ne
Nepali
my
Burmese
no
Norwegian
zh-CN
Chinese (Simplified)
pl
Polish
zh-TW
Chinese (Traditional)
pt-BR
Portuguese (Brazil)
hr
Croatian
pt-PT
Portuguese (Portugal)
cs
Czech
ro
Romanian
da
Danish
ru
Russian
nl
Dutch
sr
Serbian
en
English
sk
Slovakian
et
Estonian
sl
Slovenian
fa
Farsi/Persian
so
Somali
fi
Finnish
es
Spanish
fr
French
sw
Swahili
ka
Georgian
sv
Swedish
de
German
tl
Tagalog
el
Greek
ta
Tamil
he
Hebrew
th
Thai
hi
Hindi
tr
Turkish
hu
Hungarian
uk
Ukrainian
is
Icelandic
ur
Urdu
id
Indonesian
vi
Vietnamese
it
Italian
Fasttext models are distributed under the Creative Commons Attribution-Share-Alike License 3.0.
[1] A. Joulin, E. Grave, P. Bojanowski, T. Mikolov, Bag of Tricks for Efficient Text Classification
[2] A. Joulin, E. Grave, P. Bojanowski, M. Douze, H. Jégou, T. Mikolov, FastText.zip: Compressing text classification models