Free translation API for websites: no backend, no credit card
Is there a free translation API I can call straight from a web page?
Yes. OneTag AI translates text with a language model, and each email address gets a key with 1,000,000 free tokens a month and no credit card. In our test that covered about 1.9 million characters of English a month, roughly 300,000 words. The key is safe to leave in page source, so a static site can translate text straight from the browser with no backend.
The allowance starts again on the 1st of each month (UTC). This page has code for one string, for many strings at once and for curl, the numbers we measured, and a comparison with the other free translation APIs. Two of them are a better pick in some cases, and the page says which.
Steps
Get a free key
Enter your email at onetagai.com. The key (it starts with
ot_) arrives by email. One key per email, no card.Translate one string
Add the script tag, name the target language in plain words, and pass the text:
<script src="https://onetagai.com/v1.js" data-key="YOUR_ONETAG_KEY"></script> <script type="module"> const spanish = await onetag.ask( "Translate to Spanish. Return only the translation.", "Your order has shipped and will arrive on Friday." ); console.log(spanish); </script>In our test this printed
Tu pedido ha sido enviado y llegará el viernes.after about 2.5 seconds and used 90 tokens. The source language is detected by the model; you only name the target.Translate many strings in one call
For interface text, send the strings as one JSON array and ask for them back under a key, so the pieces stay aligned:
<script type="module"> const strings = ["Add to cart", "Free shipping on orders over $50", "Sign in"]; const { t } = await onetag.ask( 'Translate every string in this JSON array to Japanese. Return JSON {"t": [the translations, same length, same order]}.', JSON.stringify(strings), { json: true, maxTokens: 2000 } ); console.log(t); </script>tis an array of the same length and order. Withjson: truethe answer is always a JSON object, which is why the prompt asks for the array undert.Or call it over HTTP
The same key works from curl or any server language. Set
max_tokens, because the default answer length is 500 tokens:curl https://onetagai.com/v1/ask \ -H "Content-Type: application/json" \ -d '{"key": "YOUR_ONETAG_KEY", "prompt": "Translate to German. Return only the translation.", "input": "Where is the nearest train station?", "max_tokens": 1000}'The reply is
{"text": "Wo ist der nächste Bahnhof?", "usage": {"input": 76, "output": 6}}.
How much the free key translates
Tokens count the text you send plus the translation that comes back. We translated a 1,929-character English text on 2026-11-10:
| Target language | Tokens used | Time |
|---|---|---|
| Spanish | 1,003 (486 in, 517 out) | 10.1 s |
| German | 1,005 (486 in, 519 out) | 10.1 s |
| Simplified Chinese | 834 (488 in, 346 out) | 6.9 s |
So 1,000,000 tokens is about 1.9 million characters of English source text a month. A single sentence comes back in 2 to 3 seconds. A long text takes several seconds, so pass a stream callback to show the translation while it is written.
Free translation APIs compared
Translation APIs were built to be called from a server, with a secret key. On a website the first question is whether the page itself can call the API.
| API | Callable from a public page, no backend | Free allowance | What you need to start |
|---|---|---|---|
| OneTag AI | Yes. The key is public by design and can only spend its own budget | 1,000,000 tokens a month, reset on the 1st: about 1.9 million characters of English in our test | An email address. No card |
| DeepL API | No. DeepL's docs: "The DeepL API does not allow calls directly from browser-based applications" | The free Developer plan lists a one-time credit of 1,000,000 characters | A DeepL account |
| Google Cloud Translation | Possible with an API key restricted to your site's address. Use past the free amount is billed to your account | The first 500,000 characters a month, applied as a $10 credit; then $20 per million characters | A Google Cloud project with billing enabled |
| Azure Translator | Not safely. The resource key is a secret: anyone who copies it from the page can use up your quota | 2,000,000 characters a month on the free F0 tier | An Azure subscription |
| LibreTranslate | Only against a server you run | Free and open source if you run it yourself. A hosted API key starts at $14 a month, with no free trial | Your own server, or a paid key |
| MyMemory | Yes. No key, and the endpoint accepts requests from any origin | 5,000 characters a day with no sign-up; 50,000 a day if you send an email address. 500 bytes per request | Nothing |
Other providers' figures were read on their own pages on 2026-11-10; follow the link in each row for the current numbers. Free tiers change often.
Which free translation API should you use?
- A few short strings, and you want no sign-up at all: MyMemory. No key, callable from the page, 5,000 characters a day and 500 bytes per request.
- A static site that translates paragraphs, pages or user text: OneTag AI. One public key, up to 32,000 characters per call, and the same tag also summarizes, answers questions and reads images.
- You have a server and want a dedicated translation engine with glossaries or document translation: DeepL, Google Cloud Translation or Azure Translator. Azure's free tier is the largest of the three.
- Text must not leave your own machines: LibreTranslate, self-hosted.
Limits to know before you rely on it
- It is a language model, not a dedicated translation engine. There are no glossaries and no language-code parameters: you name the language in the prompt.
- The same text can be worded slightly differently on two calls. Cache the result if the wording has to stay fixed.
- One call takes up to 32,000 characters of text. Answers are 500 tokens long by default and up to 10,000 with
maxTokens(max_tokensover HTTP); a translation that stops halfway means the limit was too low. - 60 requests a minute per key and 20 a minute per IP address.
- Good for interface text, help articles and messages. For contracts or medical text, have a person check it.
Translate a whole page
To switch every text node of a page to the visitor's language and back, with a language menu, see Website translator widget in JavaScript.
Questions
Is the translation API really free?
Yes, up to 1,000,000 tokens a month per key, with no credit card. The allowance starts again on the 1st of each month (UTC). If a month's tokens are used up, calls return quota_exceeded until the 1st, or until you upgrade to Pro ($9.9 a month for 100,000,000 tokens a month).
Which languages does it support?
The languages the model knows, which covers the major ones. There is no fixed language list or language code: you write the language name in the prompt, for example "Translate to Brazilian Portuguese". Quality is best for widely used languages; test your own pair before you rely on it.
Can it detect the language of a text?
Yes. Ask for it as JSON: onetag.ask('Detect the language. Return JSON {"language": string, "code": string}.', text, { json: true }). In our test a German sentence came back as {"language": "German", "code": "de"}.
Is this the Google Translate API or the DeepL API?
No. It is a language model served by OneTag AI. The request is one prompt and one input, not the Google or DeepL request format.
Can I call the DeepL or Google Translate API from JavaScript in the browser?
DeepL blocks it: its documentation says the API does not allow calls directly from browser-based applications. Google Cloud Translation can be called with an API key restricted to your site, and needs a Cloud project with billing enabled. Both are covered in the comparison on this page.
How do I keep HTML tags or placeholders intact?
Translate text, not markup: send the text of each element as one item of the JSON array and put the results back into the elements. For placeholders such as {name}, add "Keep anything in curly braces unchanged" to the prompt and check the result in your own test.
Is it safe to put the OneTag AI key in my page?
Yes, it is designed for that. The key can only spend its own token budget and cannot read or change anything on your account. On the Pro plan you can lock it to your domain so other sites cannot use it; free keys work from any page.
What happens to the text my visitors send?
It goes to the model and comes back. OneTag AI stores token counts per key for the quota and keeps no prompts, inputs or answers. The access log carries no IP addresses.
Related guides
- Website translator widget in JavaScript: a Google Translate widget alternative
- Free AI API for websites: no backend, no credit card
- Free OCR API: image to text from a web page, no backend
- Free chatbot API for websites: chat history, streaming, no backend
Get a free key by email, paste one tag, call onetag.ask. 1,000,000 tokens a month, no card.
Updated 2026-11-11. Something wrong or missing? Email support@odysseyx.app.