A translation API lets your software send text to a machine translation engine and receive the translated result in seconds. The main options are Google Cloud Translation, DeepL API, Microsoft Translator, Amazon Translate and LLM APIs such as OpenAI, Anthropic and Gemini. Choose by language coverage, quality on your content, glossary support, data privacy and pricing model, and always add translation memory and review for important text.
This guide compares the leading translation APIs, explains how pricing works, and shows how to build a workflow that is more reliable than a single API call.
What a Translation API Does
You send a request with source text, a source language (or auto-detect) and a target language. The API returns translated text, usually as JSON. Common uses include translating user-generated content, support tickets, product catalogs and app strings, and pre-translating content that a human will review later. Google documents the basics in its Cloud Translation overview, and the other vendors follow a similar model of authentication keys, language codes and character or token limits.
Translation API Comparison
| API | Strengths | Watch out for | Pricing model |
|---|---|---|---|
| Google Cloud Translation | Very wide language coverage, mature, batch and document options | Literal output for nuanced text | Per character, with a free monthly allowance |
| DeepL API | Fluent output, glossaries, formality control | Fewer languages than Google | Free tier plus per-character usage |
| Microsoft Translator (Azure) | Custom models, document translation, Azure integration | More configuration | Per character, with free tier |
| Amazon Translate | Simple for AWS users, custom terminology | Fewer features for linguists | Per character |
| OpenAI, Anthropic and Gemini APIs | Follow tone, style and context instructions | Inconsistency and extra output unless prompts are controlled | Per token, input and output |
| LibreTranslate (open source) | Self-hosted, free software, privacy control | Lower quality for many languages and you maintain servers | Free software plus infrastructure |
Prices and limits change often, so check each provider's current pricing page before you estimate costs. If you use DeepL, our guide to the DeepL API inside a translation workflow explains glossaries and formality settings.
How to Choose a Translation API
- Test on your own content. Take 100 to 200 representative segments, run them through two or three APIs, and have a bilingual reviewer rank the output. Public benchmarks rarely match your domain.
- Check language pairs. Coverage lists look similar, but quality differs sharply for smaller languages.
- Look for terminology control. Glossary or custom terminology support keeps product names stable.
- Review privacy terms. Confirm whether data is stored, used for training and in which region it is processed.
- Estimate real cost. Per-character and per-token billing give very different results for short UI strings and long documents.
- Plan for limits. Rate limits, request size and latency matter for real-time use.
For a broader checklist, see how to choose a machine translation tool and the background on neural machine translation.
Problems You Face With a Raw API
- No memory. The same sentence is translated and billed again every time, and the wording can change.
- Broken placeholders and tags. Variables like
{name}or HTML tags can be moved or translated by mistake. - No review step. Nothing stops a wrong or missing translation from reaching users.
- Vendor lock-in. Your code depends on one provider's format and quality.
- Plurals and context. Short strings need context, and languages with several plural forms need correct handling.
A Better Architecture: Engine Layer Plus Workflow
Mature teams treat the API as one component. Source text goes into a translation workflow, which first checks translation memory for approved matches, sends only new segments to the best engine for that language pair, protects tags and placeholders, applies the glossary, runs QA checks, and routes risky content to a human reviewer. This lowers cost, because repeated text is not re-translated, and raises quality because each stage catches different errors. Read more on translation automation to see which steps are safe to automate.
With AI machine translation routed across several engines, you can swap a provider without changing your code, and compare engines on real segments instead of trusting a marketing page.
Example Request and Response
Most REST translation APIs look like this, with small differences in field names:
| Part | Typical content |
|---|---|
| Request | POST with text array, target language code (for example "de"), optional source language, glossary ID and format flag (plain text or HTML) |
| Response | JSON array with translated text, detected source language and sometimes billed characters |
| Errors | Authentication failures, quota exceeded and unsupported language pair |
Frequently Asked Questions
Is there a free translation API?
Several providers offer a free monthly allowance, and open-source options like LibreTranslate are free to self-host. Production use usually needs a paid plan or your own servers.
Can I use ChatGPT as a translation API?
Yes, through the OpenAI API with a translation prompt. Add glossary rules and QA, because outputs can vary between calls.
Which translation API is the cheapest?
It depends on text length and volume. Per-character pricing suits long documents, and per-token pricing can be cheaper for short strings. Translation memory reduces cost with any provider.
Connect Multiple Engines Without Writing Integration Code
WordBeam connects DeepL, Google and custom LLMs to one project, with translation memory, glossary, tag protection and QA on top. Compare the AI translation engines or start free with 14 days and 10,000 words.