FreeLLMAPI: One Free Endpoint for Claude Code, and Where It Breaks

TL;DR
FreeLLMAPI stacks 34 free LLM tiers behind one OpenAI-compatible endpoint and points Claude Code and Codex at it. What it is, the two commands that matter, and the limits its own docs admit.
Last updated: October 23, 2026
FreeLLMAPI is a self-hosted gateway that stacks the free tiers of about 34 LLM providers behind a single OpenAI-compatible endpoint, and it can point Claude Code and Codex CLI at that endpoint. It is climbing in search: Google Trends interest in "freellmapi" rose from roughly 10 to 23 on a 100-point scale across the last 30 days, and the repository README now shows 39.6k stars. This post covers what it does, the two commands that matter, and the limits the project documents itself.
What the primary sources say#
The project README describes the idea plainly: every serious AI lab offers a free tier, each one is small, and stacking them by hand means dozens of SDKs and rate limits. FreeLLMAPI collapses them into one /v1 API. By its own count the catalog covers 34 providers, 474 model families and 635 free provider and model endpoints, which it totals at about 7.4 billion tokens per month of listed free-tier capacity. Those are the maintainers' numbers, and they are a ceiling that assumes you have added a key for every provider.
How it works, per the architecture doc:
- An Express proxy on port 3001 accepts a single
freellmapi-...bearer token and exposes/v1/chat/completions,/v1/responses,/v1/messages,/v1/completions,/v1/embeddingsand/v1/models. - For each request the router picks the best healthy model that is under all of its rate limits, decrypts that provider key in memory and streams the answer back. On a 429 or 5xx it cools that key down and tries the next model, for up to 20 attempts.
- It tracks requests and tokens per minute and per day for each provider, model and key, and uses a bandit-style score for speed, reliability and capability.
- Provider keys are AES-256-GCM encrypted in a local SQLite database. The project calls itself local-first and single-user by design.
Two details matter if you drive a coding agent with it. First, the /v1/messages route speaks Anthropic's wire format, which is why Claude Code can use it. Second, the architecture doc says the router rescues tool calls that a model emits as plain text into real tool_calls, and only sends tool requests to models that support them.
There is also a business model. The router is MIT-licensed and free, but the README describes a paid Premium tier ($19 per year or $49 once) that keeps the model catalog current the same day, while free installs track a monthly snapshot that sits about 30 days behind. That matters because free tiers change often, so a stale catalog means more 429s and auth errors.
The angle: a gateway that trades quality for cost#
The Stratechery move: this is the same pattern we described in Free Claude Code is really a model gateway bet, pushed further. Coding harnesses are becoming interchangeable front ends, and the model behind them is now a routing decision. Who wins: hobbyists, students and anyone prototyping who hits a rate limit halfway through a task. Who loses: nobody directly, but every free tier now has its quota tested by a router built to drain it, which is exactly why providers tighten terms. The project's own terms review rates several providers "caution" or "avoid" for a proxy like this, including Cohere ("avoid") and Google Gemini, NVIDIA NIM and Z.ai ("caution"). The second-order effect is that the real product is the maintained catalog, not the proxy. That is why the paid tier is a catalog feed.
What a builder does Monday#
The commands below are copied from the README and the published npm package, not from a run on our machines. I checked that the freellmapi package exists on npm (version 0.8.2 at the time of writing) and that its code contains setup-claude, launch-codex, a --dry-run flag and a --profile option.
Start the router. The README one-liner needs Docker and pipes a script to bash, and it links the script so you can read it first:
curl -fsSL https://freellmapi.co/install.sh | bash
Read the script before you run it, because the box ends up holding provider keys. Then open http://localhost:3001, add keys on the Keys page and copy the unified key.
Point Claude Code at it. The README shows:
npx freellmapi setup-claude --url http://localhost:3001 --api-key <unified-key>
Add --dry-run first to see what it would change. The package also has a launch command that sets ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and the model variables for one session instead of writing config, and launch-codex does the same for Codex. Calling it from code uses the standard OpenAI client:
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",
messages=[{"role": "user", "content": "Summarise the fall of Rome in one sentence."}],
)
print(resp.headers.get("x-routed-via"))
The README says every response carries an X-Routed-Via: <platform>/<model> header, which is the fastest way to see which provider actually answered.
Where it breaks. The project is blunt about this in its limitations list:
- Quota and availability are the ceiling. Frontier-class models appear on someone's free tier, but with the smallest daily allowances.
- Intelligence degrades through the day. The best-ranked models have the lowest caps, so the router falls to weaker models late in the day and resets at UTC midnight. A long agent session can change models partway through.
- Latency varies, free tiers change without notice, and there is no SLA.
- It is single-user. Do not expose it to the internet.
If your problem is a Claude or Codex quota rather than cost, read our Claude Code usage limits playbook and Codex usage limits and pricing first. For a gateway you would put in front of a team, the router comparison is the better starting point, and after the LiteLLM 1.107.0 compromise it is worth treating any gateway that stores keys as a credential vault.
What people are actually saying#
Honest summary: the loud signal is stars and videos, and the written discussion is thin.
- Reach. The Better Stack walkthrough, published August 20, 2026, shows 45,957 views and compares it with OpenRouter and LiteLLM. The repository was already listed in several "cool GitHub projects" threads, such as this r/coolgithubprojects post, where the title cites 31k stars.
- The counter-case. A r/coolgithubprojects thread asking for opinions has a poster who says it looks nice but worries about malware and viruses, and says they are not a computer person. I could only read the thread preview, not the replies. That worry is reasonable for any tool that holds many API keys and installs through a pipe to bash, which is why the advice above is to read the script.
- The alternatives. A r/ClaudeCode thread about running Claude Code on free models through a different router says that free models have quotas and rate limits and that quality varies, which matches the FreeLLMAPI docs.
- Hacker News. The Hacker News submission has 1 point and a single comment from the submitter, so there is no verdict there. The submitter's summary repeats the personal-experimentation framing.
Continue Reading#
- Free Claude Code is really a model gateway bet - the earlier take on the same gateway pattern
- LLM routers compared: LiteLLM vs Portkey vs OpenRouter - gateways you would run for a team
- LiteLLM 1.107.0 compromised: check, clean and rotate - why a gateway that holds keys is a target
- Claude Code usage limits playbook - when the limit is the problem, not the price
- Codex usage limits and pricing - plan limits and resets for the OpenAI side
- DeepSeek V4 Flash free and cheap access - one free model worth knowing by name
Sources#
- FreeLLMAPI README (tashfeenahmed/freellmapi) - read October 23, 2026
- FreeLLMAPI architecture, limitations and terms-of-service review - read October 23, 2026
- freellmapi package on npm - version 0.8.2, inspected with
npm pack - Better Stack: 4 Billion Free LLM Tokens... One API - August 20, 2026
- Hacker News submission
- r/coolgithubprojects: opinion thread - preview only
- r/ClaudeCode: Claude Code on free models - preview only
Get the next deep dive like this in your inbox
One email a week on Claude Code and the rest of the AI dev stack. Free.
Read next on Claude Code
Free Claude Code Is Really a Model Gateway Bet
The trending Free Claude Code repo is not just about avoiding API bills. It points at a bigger developer-tool pattern: model gateways for AI coding agents.
7 min readLLM Routers Compared: LiteLLM vs Portkey vs OpenRouter in 2026
LiteLLM vs Portkey vs OpenRouter compared for production AI apps: cost tracking, fallbacks, caching, and load balancing, plus when to use each router.
10 min readLiteLLM 1.107.0 Compromised: Check, Clean and Rotate
LiteLLM 1.107.0 on PyPI shipped a credential stealer and a backdoor for under two hours on October 21. How to check if you ran it, what to clean first, and what to rotate.
8 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.








