REST API for machine translation · metered per character
Translation as an HTTP endpoint
POST your strings and get them back in any of 36 languages. Metered per character, run from Frankfurt, and shaped to sit next to the rest of your backend rather than on top of it.
Get a free key $ curl -X POST https://api.langapi.xyz/v1/translate
- 36
- languages you can send
- €15.00
- for a million characters
- 38
- target variants
Добрият софтуер говори езика на хората, които го използват.Bulgarian Dobrý software mluví jazykem lidí, kteří ho používají.Czech God software taler det sprog, som brugerne taler.Danish Gute Software spricht die Sprache der Menschen, die sie benutzen.German Το καλό λογισμικό μιλά τη γλώσσα των ανθρώπων που το χρησιμοποιούν.Greek Good software speaks the language of the people who use it.English El buen software habla el idioma de las personas que lo usan.Spanish Hea tarkvara räägib nende inimeste keelt, kes seda kasutavad.Estonian Hyvä ohjelmisto puhuu käyttäjiensä kieltä.Finnish Un bon logiciel parle la langue de ceux qui l’utilisent.French Labhraíonn bogearraí maithe teanga na ndaoine a úsáideann iad.Irish Dobar softver govori jezikom ljudi koji ga koriste.Croatian A jó szoftver azok nyelvén beszél, akik használják.Hungarian Góður hugbúnaður talar tungumál þeirra sem nota hann.Icelandic Un buon software parla la lingua di chi lo usa.Italian Gera programinė įranga kalba ją naudojančių žmonių kalba.Lithuanian Laba programmatūra runā to cilvēku valodā, kuri to lieto.Latvian Softwer tajjeb jitkellem bil-lingwa tan-nies li jużawh.Maltese Goede software spreekt de taal van de mensen die haar gebruiken.Dutch God programvare snakker språket til dem som bruker den.Norwegian (Bokmål) Dobre oprogramowanie mówi językiem ludzi, którzy z niego korzystają.Polish Um bom software fala a língua de quem o utiliza.Portuguese Un software bun vorbește limba oamenilor care îl folosesc.Romanian Dobrý softvér hovorí jazykom ľudí, ktorí ho používajú.Slovak Dobra programska oprema govori jezik ljudi, ki jo uporabljajo.Slovenian Bra programvara talar samma språk som de som använder den.Swedish Хороше програмне забезпечення говорить мовою людей, які ним користуються.Ukrainian İyi yazılım, onu kullanan insanların dilini konuşur.Turkish Хорошее программное обеспечение говорит на языке тех, кто им пользуется.Russian Добар софтвер говори језиком људи који га користе.Serbian Dobar softver govori jezikom ljudi koji ga koriste.Bosnian Добриот софтвер го зборува јазикот на луѓето што го користат.Macedonian Softueri i mirë flet gjuhën e njerëzve që e përdorin.Albanian Un bon programari parla la llengua de les persones que l’utilitzen.Catalan Software onak erabiltzen duten pertsonen hizkuntza hitz egiten du.Basque Un bo software fala a lingua das persoas que o usan.Galician
01
Metered like bandwidth
Characters in, invoice out. No seats to license, no annual contract, no minimum. Top up a prepaid balance or take a monthly plan with volume included, and change your mind whenever you like.
02
Built where the GDPR is home turf
Application, database and queue run in Frankfurt. Usage records hold counts, never content. The output cache is optional per team, and every sub-processor is named in the data processing agreement.
03
Speaks the request format you already use
Request and response follow the widely used v2 translation convention. For most existing client code that means a new base URL, a new key, and nothing else.
Your first request, in the language you write
Pass up to 50 strings and a target language code. Source detection, formality and glossaries are opt-in parameters, not extra endpoints.
curl
curl -X POST https://api.langapi.xyz/v1/translate \
-H "Authorization: Bearer la_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"text":["Thanks for your order"],"target_lang":"DE"}'
PHP
$ch = curl_init('https://api.langapi.xyz/v1/translate');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer la_live_xxxxxxxx', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['text' => ['Thanks for your order'], 'target_lang' => 'DE']),
]);
$response = json_decode(curl_exec($ch), true);
echo $response['translations'][0]['text'];
JavaScript
const response = await fetch('https://api.langapi.xyz/v1/translate', {
method: 'POST',
headers: { Authorization: 'Bearer la_live_xxxxxxxx', 'Content-Type': 'application/json' },
body: JSON.stringify({ text: ['Thanks for your order'], target_lang: 'DE' }),
});
const { translations } = await response.json();
console.log(translations[0].text);
Python
import requests
response = requests.post(
"https://api.langapi.xyz/v1/translate",
headers={"Authorization": "Bearer la_live_xxxxxxxx"},
json={"text": ["Thanks for your order"], "target_lang": "DE"},
timeout=30,
)
print(response.json()["translations"][0]["text"])
Go
body, _ := json.Marshal(map[string]any{
"text": []string{"Thanks for your order"},
"target_lang": "DE",
})
req, _ := http.NewRequest("POST", "https://api.langapi.xyz/v1/translate", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer la_live_xxxxxxxx")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
Thirty-six ways in, thirty-eight ways out
British and American English, and European and Brazilian Portuguese, are separate targets so the spelling matches the market you ship to.
- BG Bulgarian
- CS Czech
- DA Danish
- DE German
- EL Greek
- ES Spanish
- ET Estonian
- FI Finnish
- FR French
- GA Irish
- HR Croatian
- HU Hungarian
- IS Icelandic
- IT Italian
- LT Lithuanian
- LV Latvian
- MT Maltese
- NL Dutch
- NB Norwegian (Bokmål)
- PL Polish
- PT Portuguese
- RO Romanian
- SK Slovak
- SL Slovenian
- SV Swedish
- UK Ukrainian
- TR Turkish
- RU Russian
- SR Serbian
- BS Bosnian
- MK Macedonian
- SQ Albanian
- CA Catalan
- EU Basque
- GL Galician
faq
Questions we get before the first key
What does the translation quality look like?
A large language model does the translating, steered by a prompt written for translation, your glossary terms and the formality you ask for. On European pairs it holds up against the established engines. The fastest way to judge it is the box above: paste your own text, no account required.
Where does my text go?
To Frankfurt first: the application, database and queue run in Germany. The engine behind it may process text in the EU or the US, depending on the configuration named in the data processing agreement, and any transfer is covered by the EU standard contractual clauses.
Does markup survive the round trip?
Yes. With tag_handling set to html or xml, tags and attributes stay untouched and only the text between them is translated. Whole documents such as DOCX or PDF are planned but not part of the current release.
What does switching from another provider involve?
Usually a new base URL, https://api.langapi.xyz/v1, and a new key. The request format follows the common v2 convention and the DeepL-Auth-Key header is accepted too, so most existing client libraries keep working as they are.
How much can I send at once?
Fifty strings per request, between 50,000 and 200,000 characters per request depending on the plan, and 10 to 100 requests per second. The rate-limit headers on every response tell you where you stand.