Free LLM API: one HTTP POST, no credit card
Is there a free LLM API I can call from my code without a credit card?
Yes. OneTag AI is a free LLM API: one email address gets a key with 1,000,000 tokens a month and no credit card, and a call is a single HTTP POST with a prompt. There is no SDK to install and no model to pick.
The allowance starts again on the 1st of each month (UTC). One fast model answers every call. If you need to choose the model or keep the OpenAI request format, the comparison below lists the free LLM APIs that offer that, with their limits.
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.Send a prompt
One POST with the key, a prompt and an optional input:
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}}.Call it from Python or Node
Python needs only the standard library:
import json, urllib.request def ask(prompt, input=None, **options): body = {"key": "YOUR_ONETAG_KEY", "prompt": prompt, "input": input, **options} req = urllib.request.Request( "https://onetagai.com/v1/ask", data=json.dumps(body).encode(), headers={"Content-Type": "application/json"}, ) with urllib.request.urlopen(req) as res: return json.load(res)["text"] print(ask("Classify the sentiment as positive, negative or neutral. One word.", "The checkout was fast and the box arrived a day early."))Node 18 or later has
fetchbuilt in; save this as a.mjsfile. Withjson: truethe model answers with a JSON object, returned as a string intext:const res = await fetch("https://onetagai.com/v1/ask", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ key: "YOUR_ONETAG_KEY", prompt: "Extract {name, price, currency}", input: "Aeropress Go, 39.95 USD, ships in two days.", json: true, }), }); const { text, usage } = await res.json(); console.log(JSON.parse(text), usage);
Request options
| Field | What it does |
|---|---|
prompt | The instruction. Required |
input | The text to work on: a string, or a list of text parts and at most one image as a base64 data URL |
system | Extra standing instructions, such as a tone or a role |
json | true makes the answer a JSON object |
max_tokens | Longest answer allowed: 500 by default, up to 10,000 |
stream | true sends the answer as server-sent events while it is written |
history | Earlier turns of a conversation, up to 100 messages |
Streaming sends one data: line per piece of text, then a last event with done and the usage:
curl -N https://onetagai.com/v1/ask \
-H "Content-Type: application/json" \
-d '{"key": "YOUR_ONETAG_KEY", "prompt": "Write a haiku about static sites", "stream": true}'data: {"delta": "Static"}
data: {"delta": " pages"}
data: {"delta": " load"}
...
data: {"done": true, "usage": {"input": 58, "output": 17}}For a chat, send the earlier turns in history and the new message as the prompt:
curl https://onetagai.com/v1/ask \
-H "Content-Type: application/json" \
-d '{"key": "YOUR_ONETAG_KEY", "system": "Answer in one short sentence.", "prompt": "And in Fahrenheit?", "history": [{"role": "user", "content": "At what temperature does water boil at sea level, in Celsius?"}, {"role": "assistant", "content": "100 degrees Celsius."}]}'Errors come back as JSON with an HTTP status, for example 401 with {"error": {"code": "bad_key", "message": "Unknown or disabled key."}}. The codes to handle are rate_limited and quota_exceeded (both 429), too_large (413) and upstream (502). The full reference is in the HTTP API docs.
Limits of the free key
| 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 |
From server code, the limit you meet first is the 20 requests a minute per IP address: a script on one machine cannot go faster than that, whatever the key allows.
Free LLM APIs compared
The table looks at each API the way code that calls it does: the request format, whether you choose the model, and what the free tier allows.
| API | Request format | Choose the model | Free allowance | Card to start |
|---|---|---|---|---|
| OneTag AI | Its own small JSON: key, prompt, input. Not OpenAI-compatible | No. One fast model, chosen for you | 1,000,000 tokens a month per key, reset on the 1st | No |
| Puter.js | A JavaScript library for the browser and Node.js (puter.ai.chat), not an HTTP endpoint you call yourself | Yes, with a model option | No fixed number for the site. Each visitor gets a free monthly allowance on their own Puter account, then is asked to upgrade | No |
| Groq | OpenAI-compatible: base URL https://api.groq.com/openai/v1 | Yes | 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 |
| OpenRouter free models | OpenAI-compatible: base URL https://openrouter.ai/api/v1 | Yes, among the models ending in :free: 13 in its model list that day | 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 |
| Google Gemini API | Its own REST API, plus an OpenAI-compatible endpoint | Yes, among the models the free tier includes | 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 |
| Cloudflare Workers AI | OpenAI-compatible endpoints under your account's /ai/v1, or a Worker binding | Yes | 10,000 Neurons a day (Cloudflare's usage unit), renews daily | Not stated on the pricing page |
Other providers' cells were read on their own pages on 2026-11-10; follow the links 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 LLM API should you use?
- You want a specific open model, or to compare several: Groq or OpenRouter free models. Both accept the OpenAI request format, so code written for the OpenAI SDK works after changing the base URL and the key.
- You want Gemini models: Google's free tier. Check your limits in AI Studio first, because Google does not publish fixed numbers.
- You already deploy on Cloudflare: Workers AI.
- You want the least setup, or the call will run in a browser: OneTag AI. One POST, no model name, and the same key is safe in front-end code. See Free AI API for websites.
What OneTag AI does not do: there is no model parameter, no OpenAI-compatible route, no embeddings and no function calling. It is one endpoint that turns a prompt and an input into text or JSON.
The same key works in a web page
LLM keys are normally secrets that must stay on a server. A OneTag AI key is public by design: it can do one thing and can only spend its own token budget, so a static page can call the model with no backend. Add one script tag and call onetag.ask(prompt, input):
<script src="https://onetagai.com/v1.js" data-key="YOUR_ONETAG_KEY"></script>
<script type="module">
const answer = await onetag.ask("Explain this in plain words", document.querySelector("article"));
</script>Why that is safe, and what a stranger can do with a copied key: Is it safe to put an AI API key in a static HTML page?
Questions
Is the free LLM API really free?
Yes, up to 1,000,000 tokens a month per key, input and output counted together, 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).
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. Groq, OpenRouter, Gemini and Cloudflare Workers AI all offer OpenAI-compatible endpoints; see the comparison on this page.
What are the rate limits?
60 requests a minute per key and 20 a minute per IP address. Each call takes up to 32,000 characters of text and one image up to 2 MB, and answers are up to 10,000 tokens (500 by default).
Can I build a chatbot with it?
Yes. Send the earlier turns in history (up to 100 messages), the new message as the prompt, and set stream to true to show the answer as it is written.
Can I call it from the browser?
Yes. The key is public by design, so it can sit in front-end code. A script tag adds onetag.ask(), or you can call the HTTP endpoint with fetch.
Is there a free LLM API with unlimited use?
Not from OneTag AI: the free key has a fixed budget of 1,000,000 tokens a month. 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 AI API for websites: no backend, no credit card
- Free chatbot API for websites: chat history, streaming, no backend
- Free translation API for websites: no backend, no credit card
- Free OCR API: image to text from a web page, no backend
- Is it safe to put an AI API key in a static HTML page?
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.