OneTag AI

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

  1. 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.

  2. 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.

  3. 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>

    t is an array of the same length and order. With json: true the answer is always a JSON object, which is why the prompt asks for the array under t.

  4. 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 languageTokens usedTime
Spanish1,003 (486 in, 517 out)10.1 s
German1,005 (486 in, 519 out)10.1 s
Simplified Chinese834 (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.

APICallable from a public page, no backendFree allowanceWhat you need to start
OneTag AIYes. The key is public by design and can only spend its own budget1,000,000 tokens a month, reset on the 1st: about 1.9 million characters of English in our testAn email address. No card
DeepL APINo. 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 charactersA DeepL account
Google Cloud TranslationPossible with an API key restricted to your site's address. Use past the free amount is billed to your accountThe first 500,000 characters a month, applied as a $10 credit; then $20 per million charactersA Google Cloud project with billing enabled
Azure TranslatorNot safely. The resource key is a secret: anyone who copies it from the page can use up your quota2,000,000 characters a month on the free F0 tierAn Azure subscription
LibreTranslateOnly against a server you runFree and open source if you run it yourself. A hosted API key starts at $14 a month, with no free trialYour own server, or a paid key
MyMemoryYes. No key, and the endpoint accepts requests from any origin5,000 characters a day with no sign-up; 50,000 a day if you send an email address. 500 bytes per requestNothing

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?

Limits to know before you rely on 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.

Try it on your sitefree

Get a free key by email, paste one tag, call onetag.ask. 1,000,000 tokens a month, no card.

Get a free key

Updated 2026-11-11. Something wrong or missing? Email support@odysseyx.app.