freellm
v1.0.2
Published
One OpenAI-compatible endpoint for 15+ free LLM providers. Smart routing, failover, encrypted keys. Run with npx freellm.
Maintainers
Readme
FreeLLM
One OpenAI-compatible endpoint. 15+ free LLM providers. No billing.
Aggregate the free tiers from Google, Groq, Cerebras, Mistral, OpenRouter, GitHub Models, Cohere, Cloudflare Workers AI, HuggingFace, Ollama, Pollinations, LLM7, OVH AI Endpoints — behind a single /v1 API. Smart routing, automatic failover, encrypted key storage, web dashboard. All features free.
Quick start
npx freellmThat's it. Opens a dashboard at http://localhost:3000.
What it does
- Add your free API keys on the Keys page (Google, Groq, etc.)
- Copy your unified key from the dashboard
- Point any OpenAI client at
http://localhost:3000/v1:
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="freellm-your-unified-key",
)
resp = client.chat.completions.create(
model="auto", # smart routing picks the best available provider
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
print("Routed via:", resp.headers.get("x-routed-via"))curl http://localhost:3000/v1/chat/completions \
-H "Authorization: Bearer freellm-your-unified-key" \
-H "Content-Type: application/json" \
-d '{"model": "auto", "messages": [{"role": "user", "content": "hi"}]}'Supported providers (all free tiers)
| Provider | Free models | Key needed | |---|---|---| | Google Gemini | Gemini 2.5 Flash, 2.0 Flash, 1.5 Flash | Yes (aistudio.google.com) | | Groq | Llama 3.3 70B, 3.1 8B, Gemma 2 9B | Yes (console.groq.com) | | Cerebras | Llama 3.3 70B, 3.1 8B | Yes (cloud.cerebras.ai) | | Mistral | Mistral Small, Nemo, Codestral | Yes (console.mistral.ai) | | OpenRouter | 20+ free models (:free suffix) | Yes (openrouter.ai) | | GitHub Models | GPT-4o, GPT-4o Mini | Yes (github.com) | | Cohere | Command R+, Command R | Yes (dashboard.cohere.com) | | Cloudflare | Llama 3.1 8B, Gemma 7B | Yes (ACCOUNT_ID:TOKEN) | | HuggingFace | Llama 3 8B, Mistral 7B | Yes (huggingface.co) | | Ollama | Any local model | No | | Pollinations | GPT-OSS, Mistral | No | | LLM7 | GPT-4o Mini, Llama 70B | No | | OVH AI Endpoints | Llama 3.3 70B, Mistral 7B | No |
Features
- OpenAI-compatible —
/v1/chat/completions,/v1/models, streaming, tool calling, vision - Smart routing — picks highest-priority healthy model for each request
- Automatic failover — on 429/5xx, skips to next provider in chain (up to 20 attempts)
- Rate limit tracking — in-memory per-provider counters, no key is sent over its limits
- Encrypted storage — API keys are AES-256-GCM encrypted at rest in SQLite
- Web dashboard — manage keys, reorder fallback chain, playground, analytics
- No billing — all features free, forever
Options
npx freellm --port 8080 # custom port (default: 3000)
npx freellm --no-open # don't open browser automaticallyData storage
All data (database + encryption key) is stored in ~/.freellm/.
Requirements
- Node.js 22.5+ (uses built-in
node:sqlite)
License
MIT
