Free AI API for websites: no backend, no credit card
Is there a free AI API I can call straight from a web page, without a server?
Yes. OneTag AI gives each email address one API key with 1,000,000 free tokens a month and no credit card, and the key is safe to leave in public page source. So a static site, a GitHub Pages project or a single HTML file can call a language model straight from the browser, with no backend and no secret to hide.
The allowance starts again on the 1st of each month (UTC). 1,000,000 tokens is roughly 600 summaries of a 1,200-word blog post. This page shows the two ways to call the API, lists every limit of the free key, and compares it with the other free AI APIs so you can pick the right one.
Steps
Get a free key
Enter your email at onetagai.com. The key (it starts with
ot_) arrives by email with a dashboard link. One key per email, no card, usable on any number of sites.Call it from a web page
Add one script tag, then call
onetag.ask(prompt, input). It returns text, a stream or parsed JSON:<script src="https://onetagai.com/v1.js" data-key="YOUR_ONETAG_KEY"></script> <script type="module"> const summary = await onetag.ask("Summarize in 3 bullets", document.querySelector("article")); document.querySelector("#summary").textContent = summary; </script>Or call it over HTTP
The same key works from curl, Python, Node or any language. It is one POST:
curl https://onetagai.com/v1/ask \ -H "Content-Type: application/json" \ -d '{"key": "YOUR_ONETAG_KEY", "prompt": "Summarize in one sentence", "input": "Paste any text here."}'The answer comes back as JSON with the tokens it used:
{"text": "...", "usage": {"input": 61, "output": 14}}. Python and Node examples, streaming and chat history are on Free LLM API; the full field list is in the HTTP API docs.
What the free key includes
| Free key | |
|---|---|
| Price | $0, no credit card |
| Tokens | 1,000,000 a month per key, input and output counted together. Starts again on the 1st (UTC) |
| Rate limit | 60 requests a minute per key, 20 a minute per IP address |
| Per call | Up to 32,000 characters of text and one image up to 2 MB; answers up to 10,000 tokens (500 by default) |
| Where the key works | Any web page on any domain, and curl or server code |
| Features | Text answers, streaming, JSON output, image input, chat history |
| Model | One fast model served through OpenRouter. You do not choose it |
| Data | Prompts, inputs and answers are not stored. Only token counts per key are kept |
| When it runs out | Calls return quota_exceeded until the 1st and you get an email. Pro is $9.9 a month for 100,000,000 tokens a month; the key stays the same |
Free AI APIs compared
Most free AI APIs give you a secret key. That works on a server, but a static page has nowhere to hide it: anything in the page source is public. The column that matters for a website is the second one.
| API | Callable from a public page, no backend | Free allowance | Card to start | Who signs up |
|---|---|---|---|---|
| OneTag AI | Yes. The key is public by design and can only spend its own budget | 1,000,000 tokens a month per key, reset on the 1st | No | The site owner, by email. Visitors never sign in |
| Puter.js | Yes. No key at all | No fixed number for the site. Each visitor gets a free monthly allowance on their own Puter account, then is asked to upgrade | No | Every visitor. They are prompted to sign in with a Puter account |
| Groq | No. Secret key; the official SDK disables browsers by default | Free plan, renews daily. For openai/gpt-oss-120b: 30 requests a minute, 1,000 requests a day, 200,000 tokens a day | Only to upgrade | The developer |
| OpenRouter free models | No with your own key (keep it out of client-side code). Its OAuth flow works in a page, but each visitor signs in and uses their own key | Models ending in :free: 20 requests a minute, 50 requests a day. 1,000 a day once you have bought 10 credits | Not for the 50 a day | The developer |
| Google Gemini API | No. Google's key guide says not to put keys in web apps and to run a backend proxy | Free tier with limited access to certain models. Google does not publish fixed numbers: limits depend on your usage tier and are shown in AI Studio | Only to upgrade | The developer |
| Cloudflare Workers AI | No. It runs inside a Worker you deploy, or over a REST API with a secret token | 10,000 Neurons a day (Cloudflare's usage unit), renews daily | Not stated on the pricing page | The developer |
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.
Checked the same day and no longer free: GitHub Models (retired on July 30, 2026); Mistral (the free mode no longer includes API access; API keys need billing activated); Hugging Face Inference Providers (free accounts get no monthly credits); Cerebras (a $5 trial credit that expires after 30 days and needs a verified payment method).
Which free AI API should you use?
- A static site, and visitors should not have to sign in: OneTag AI. One public key, one fixed budget, nothing to deploy.
- A static site with heavy use, where it is fine for each visitor to sign in: Puter.js. Usage is carried by each visitor's Puter account instead of yours. See Ways to add AI to a static site, compared.
- You have a server or a serverless function: Groq, OpenRouter free models or the Gemini free tier. Groq and OpenRouter limits renew every day, and you can choose the model. The key has to stay on the server.
- You already deploy on Cloudflare: Workers AI from inside a Worker.
The trade is simple. The other free tiers let you choose a model, and some allow more use, but they need a place to hide a key, or a sign-in for every visitor. OneTag AI gives 1,000,000 tokens a month and works from a plain HTML file.
Why a normal API key does not work in a web page
A key from a model provider is a password to your account. Put it in HTML or JavaScript and anyone who views the source can copy it and spend your quota from anywhere. The usual fix is a small server that holds the key and forwards requests, which is exactly the backend a static site does not have. A OneTag AI key is built the other way round: it is meant to be public, it can do one thing, and it can only spend its own token budget. The details are in Is it safe to put an AI API key in a static HTML page?
What you can build with it
- A TL;DR button on blog posts:
onetag.ask("Summarize in 3 bullets", article). - A question box that answers from the page or from your docs.
- Translate text or a whole page: Free translation API.
- Read the text in a photo or a receipt: Free OCR API.
- A chat box with history and streaming: Free chatbot API.
- Turn messy text or a form into JSON:
onetag.ask(prompt, form, { json: true }). - Twelve copy-paste blocks, one HTML file each: aiblock.onetagai.com.
Questions
Is the OneTag AI 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, the key stops answering until the 1st, or until you upgrade to Pro ($9.9 a month for 100,000,000 tokens a month).
Do I need a credit card or a paid account to start?
No. You enter an email address and the key is sent to it. A card is only asked for if you choose to upgrade to Pro.
Is there a free AI API with no API key at all?
OneTag AI still uses a key, so that usage can be counted, but it is a public key: you paste it into the page and there is nothing to hide and no server to run. Getting one takes an email address.
Can I use it from Python, Node or curl instead of a web page?
Yes. It is one HTTP POST to https://onetagai.com/v1/ask with the key, a prompt and an optional input. A free key works from any language and any domain.
Is it compatible with the OpenAI API format?
No. It is a single endpoint with its own small JSON shape: key, prompt, input, and a few options. There is no model parameter and no chat-completions route. If you need the OpenAI format or a choice of models, use one of the other APIs in the comparison behind your own server.
Is there a free AI API with unlimited use?
Not from OneTag AI: the free key has a fixed budget of 1,000,000 tokens a month, and that fixed budget is what makes a public key safe. Be careful with anything described as unlimited: someone pays for every model call, so check who that is and what the rate limits are.
Which model answers?
A fast, inexpensive model from OpenRouter, chosen for sub-second first tokens and good instruction following. You do not pick a model; the point is one tag that keeps working.
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
- Free LLM API: one HTTP POST, no credit card
- Free translation 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
- Is it safe to put an AI API key in a static HTML page?
- Ways to add AI to a static site, compared
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.