Documentação
Documentação
Um único endpoint faz o trabalho; estas páginas cobrem tudo à sua volta, desde a primeira chave até ao último código de erro.
Primeiros passos
-
Quickstart for the translation API
Get an API key, send one POST to /v1/translate and read the reply. Everything you need for a first working call, without installing a client library.
-
API keys and authentication
Which headers carry your API key, what live and test keys are, how revoked keys are reported and how to rotate a key with no failed requests.
-
Switching from DeepL
Move an existing DeepL integration to Language API by changing the base URL and key, and see which parameters, endpoints and behaviours differ.
-
Client code in five languages
Ready-to-adapt translate clients for Python, TypeScript, PHP, Go and the shell, plus the three behaviours every client should implement.
Referência
-
POST /v1/translate reference
Parameters, validation order, response fields, headers and plan limits of the translate endpoint, including how the cache and the character count work.
-
Supported language codes
All 36 source and 38 target codes, the English and Portuguese variants, how codes are normalised, and how automatic source detection behaves.
-
Usage and quota
What GET /v1/usage returns for subscriptions and prepaid credit, how characters are reserved before translation, and how the overage cap protects you.
-
Tokens versus billed characters
Why the API reports engine tokens next to a per-character price, where the counts appear, what makes them fluctuate, and why they never affect cost.
-
Glossary endpoints
Create, list, read, export and delete glossaries, attach one to a translate request, and the entry limits and language-pair rules that apply.
Controlar o resultado
-
Formality control
Pick formal or informal address per request, understand the difference between more/less and prefer_more/prefer_less, and see which targets take it.
-
HTML and XML tag handling
Send markup through /v1/translate with tags, attributes and placeholders left untouched, and know what is translated, what is counted and what is not.
Executar em produção
-
Error codes reference
The problem+json format, every stable error code with its HTTP status and extra fields, a code-by-code guide, and which failures are safe to retry.
-
Request rate limits
Requests per second by plan, the X-RateLimit headers, how the one-second sliding window is enforced, and how to size a client so 429s stay rare.