One API Key. 1 Billion Free AI Tokens. Every Month.
14 free AI providers stacked behind one OpenAI-compatible endpoint. Self-hosted, MIT, no card.
One key, every free brain on the internet โ Gemini, Groq, Cerebras, GitHub Models + 10 more. Auto-failover when one runs dry.
Repo: github.com/tashfeenahmed/freellmapi
๐ง How it works โ 30 sec
Normal life: You want free AI โ sign up at Google โ sign up at Groq โ sign up at OpenRouter โ juggle 14 different keys โ each one rate-limits you mid-task โ rage quit.
FreeLLMAPI life: Sign up free at each โ paste all keys into the FreeLLMAPI dashboard โ it gives you ONE master key. Your app calls that one key. Behind the curtain, it picks whichever provider still has budget left and routes there. One runs dry? Auto-falls-back to the next. You never see the chaos.
Think of it like a credit-card juggling app for AI โ except every โcardโ is a free tier and you never get a bill.
It speaks OpenAIโs language. Any app that works with ChatGPTโs API works with this โ Cursor, LangChain, the OpenAI Python SDK, curl, whatever. Just swap one URL.
๐ฐ The math โ what 1 billion tokens actually buys
Per month, free, stacked together:
| Provider | Free quota/mo | Best for |
|---|---|---|
| ~1 billion (the whale) | Mistral Large/Medium, Codestral | |
| ~30M (1M tokens/day) | Fastest tokens youโll ever see โ 30 RPM | |
| ~30M | Llama 3.3 70B, GPT-OSS 120B/20B | |
| ~6M (19 free models) | DeepSeek, Kimi, Qwen, Llama, Gemma | |
| ~3M (20 RPD per model) | Gemini 2.5 Flash, Pro previews | |
| ~18M est. (50 RPD) | GPT-4.1, GPT-4o (free Copilot tier) | |
| ~3M | DeepSeek V3.1/V3.2, Llama 4 Maverick | |
| ~20M | Kimi K2.5, Qwen3, GLM-4.7 | |
| ~30M | GLM-4.5 Flash, GLM-4.7 Flash | |
| ~1-2M (1000 calls/mo, 20 RPM) | Command R+ | |
| credits-based | Llama 3.1 70B |
Thatโs ~$50โ150/month of API value, free, every month.
RPD = Requests Per Day. RPM = Per Minute. TPD = Tokens Per Day. Each provider sets their own cap.
๐ฟ The smart-routing magic
| Feature | Plain English |
|---|---|
model="auto" |
The router picks the best available model for your request โ you donโt even have to choose |
| One provider rate-limits? Skips it, retries the next. Up to 20 attempts. | |
| Multi-turn convos stay on the same model for 30 min โ no hallucination spike from mid-chat switching | |
| Counts RPM/RPD/TPM/TPD per provider per model โ never overshoots a free cap | |
| API keys locked with AES-256-GCM, decrypted only when needed | |
| Your apps see ONE key. Upstream chaos never leaks. | |
Marks dead keys as healthy / rate_limited / invalid / error. Auto-skips dead ones. |
|
| Pretty React UI: add keys, reorder fallback order, see analytics, run prompts in a playground | |
Full OpenAI-style tools and tool_choice โ works across every provider that supports it |
|
| ~40 MB RAM at idle. Cheap home server = free AI for life. |
๐ฎ Setup โ 3 minutes
Prereqs: Node.js 20+ and npm. Thatโs it.
Clone + install + run:
git clone https://github.com/tashfeenahmed/freellmapi.git
cd freellmapi
npm install
Generate an encryption key (locks your API keys at rest):
cp .env.example .env
echo "ENCRYPTION_KEY=$(node -e "console.log(require('crypto').randomBytes(32).toString('hex'))")" >> .env
Start the server + dashboard:
npm run dev
Open http://localhost:5173 โ paste in your provider keys โ reorder the fallback chain โ grab your unified key from the header. Thatโs the one your apps point at.
For production (single server, no dev mode):
npm run build
node server/dist/index.js
๐ช Hooking it up to your apps
Any OpenAI-compatible app/SDK works. Just point base_url at your local proxy.
Python (the most common):
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:3001/v1",
api_key="freellmapi-your-unified-key",
)
resp = client.chat.completions.create(
model="auto", # let the router pick, OR specify like "gemini-2.5-flash"
messages=[{"role": "user", "content": "Summarise the fall of Rome in one sentence."}],
)
print(resp.choices[0].message.content)
curl (raw test):
curl http://localhost:3001/v1/chat/completions \
-H "Authorization: Bearer freellmapi-your-unified-key" \
-H "Content-Type: application/json" \
-d '{"model": "auto", "messages": [{"role": "user", "content": "hi"}]}'
Works with Cursor, LangChain, LlamaIndex, Continue, Hermes, etc. โ anything that says โOpenAI-compatible.โ Just change one URL.
๐ก๏ธ Catch check
| Q | A |
|---|---|
| Actually free? | Yes. Every listed provider has a recurring free tier, no card. Sign up free, paste key, done. |
| Quality vs paid GPT/Claude? | Mistral Large + DeepSeek V3.1 + Llama 3.3 70B = roughly Sonnet-tier for most tasks |
| Safe? | MIT licensed, 3.5k |
| Will providers ban me? | Youโre using their official free tiers within limits. Same as using each one directly. |
| Embeddings / image gen / audio? | |
| Multi-user / billing? | |
| Logs my prompts? | Local SQLite only. Nothing phoned home. |
| Vision / multimodal? |
๐ฏ What to build with this
| Play | Free fuel makes it possible |
|---|---|
| Run 24/7 on a Pi, never pay a bill | |
| Blog posts, SEO, social โ burn 18M tokens/mo guilt-free | |
| Stop ghosting your ideas because OpenAI charges money | |
| Free embeddingsโฆ wait no. Use a separate free embeddings provider. | |
| Point them at this, code with free AI all day | |
| Compare 60 free models on the same prompt, no card | |
| Run on a $5 VPS, serve your whole team |
Simple-pimple: clone repo โ npm install โ paste 14 free API keys into the dashboard โ get ONE master key back โ use it in any OpenAI-style app. Auto-falls-back when one runs out. Free 1 billion tokens a month, forever.
One key, every free brain. The juggling act is now someone elseโs problem.

!