958,000 people watched one video on how to get Claude Code for free, and the videos like it all show the same setup: keep Claude Code, point it at a free model, and watch it start and answer like the real one. I couldn’t find one that gave the free version a real task with tests it couldn’t see. I pay $20 a month for Claude Pro, so I wanted to know what that money buys over the free routes.
📺 Watch the video: Free Claude Code vs Pro: Is the $20 Plan Actually Worth It?
How a free Claude Code works
Claude Code is the tool: the terminal app, its file and shell tools, its to-do list and its instructions. The model is whatever answers its requests. I think of Claude Code as a desk and the model as the person you hire to sit at it. Every free version keeps the desk and changes the hire.
You change the hire with a few environment variables. ANTHROPIC_BASE_URL points Claude Code at something other than Anthropic, and the model variables name the model to ask for. For a cloud model I ran LiteLLM, a proxy that turns Claude Code’s requests into OpenAI’s format. For a local model, Ollama has its own Claude Code launcher.
Anthropic’s docs say they don’t support routing Claude Code to non-Claude models through a gateway, so both free setups here are unsupported.
The setup
- Claude Code 2.1.318 on a Mac mini M4 with 16 GB of RAM, a fresh copy of the repo for every run
- Teal: Claude on my $20 Pro plan, signed in, no API key. Opus as the big model, and Haiku as Anthropic’s small model on the same plan
- Purple: gpt-5-mini on Azure OpenAI, paid from the $200 credit a new Azure account gets, through LiteLLM v1.106.4 from its official Docker image
- Pink: Google’s Gemma 4 12B on the same Mac through Ollama
I pinned LiteLLM to the Docker image because two of its PyPI releases carried a credential stealer in March.
The task is a small till app that prints shop receipts. The checks stay hidden from the model, so it can’t write code to fit them.
Test 1: does it even work?
A one-file bug: the receipt lines don’t add up to the total. Five hidden checks. All four passed. Opus took 18 s, Haiku 20 s, gpt-5-mini 56 s for about 1.5 cents of credit, and Gemma 35 min 36 s. So the tutorials are right that it works. They stop before it gets hard.
Test 2: is unlimited unlimited?
I counted model requests per run on the hard task. Both Claude models used 9 to 14, gpt-5-mini 21 to 31 and Gemma 24 to 36.
| Route | What it allows | What that means here |
|---|---|---|
| OpenRouter free models | 50 requests a day unless you’ve bought $10 of credit | about two hard tasks a day |
| Azure (my deployment) | 500K tokens a minute | I never hit it |
| Claude Pro | a 5-hour window and a weekly limit | one Opus run used about 4% of the window |
Five Haiku runs moved the 5-hour bar one point. The local model has no cap at all, only its speed.
Claude Code’s own cost counter priced one gpt-5-mini run at $1.13, and Azure charged 8 cents for it. Claude Code assumes Claude prices for a model name it doesn’t know, so take your bill from the provider.
Test 3: the one-penny trap
The hard task adds weighed items across several files, with 15 hidden checks. The trap is half pennies. 1.005 kg of carrots at £1.00 a kilo has to come to £1.01, but 1.005 is stored as 1.00499… in floating point, so a quick version rounds it to £1.00. The checks also feed it bad input: a weight of 0, a negative weight, the word “some”. Each has to print an error, not crash.
The race: 5 runs each
| Passed | Median time | Cost per pass | |
|---|---|---|---|
| Opus on Pro | 5/5 | 85 s | $0.38 at API list price |
| Haiku on Pro | 5/5 | 64 s | about 1.6 cents at API list price |
| gpt-5-mini on Azure credit | 2/5 | 4 min 55 s | 19 cents of credit |
| Gemma 4 12B on the Mac | 0/5 | about 60 min (the cap) | free, no passes |
gpt-5-mini got the half pennies right every time. It lost three runs on bad input, where a weight of 0 crashed the till instead of printing an error. Gemma never got there: three runs hit the one-hour cap, and the two that finished took about 27 minutes and charged £1.00 for the carrots. The Mac was swapping 6 to 7 GB during every Gemma run.
Over 30 days on this task, that comes to about 25 Opus passes per 5-hour window and roughly 800 a month before the weekly limit, around 16,000 on Haiku by my bars, about 1,000 passes from the $200 Azure credit and none from Gemma on this Mac.
What I took from it
Judge a free Claude Code by what a passing run costs you. Gemma costs nothing and passed nothing on the hard task, though it’s fine for a small fix if you can wait half an hour. The Azure credit is the free route that does real work. It’s cheap and fast enough, but it passed two in five, so keep your tests running, and the credit ends after 30 days. After that you’d pay about 19 cents a pass. On this task, the $20 plan got five out of five on the big Claude and on the small one.
Free here means free to me this month. The credit runs out, and the local runs used my own Mac and electricity.
Race your own task
The gist has the LiteLLM config, the settings for all three setups and a race script. Give it your own task and your own test command, and it prints passes, median time, requests and cost per pass for each setup.
Run your own task through it before you trust a free setup, and tell me in the video’s comments which one passed.
Code & video
- 📺 Full video: Free Claude Code vs Pro: Is the $20 Plan Actually Worth It?
- âš¡ The Short: youtube.com/shorts/1dMN0Yc5S_c
- 💻 The gist: free-claude-code-tested
- 📚 Docs: Claude Code LLM gateways, LiteLLM with non-Anthropic models, Ollama’s Claude Code integration, Azure OpenAI pricing, OpenRouter limits
- 🎬 My earlier test: Is Claude Code on Ollama Really Free?
If this was useful, subscribe to The Coderlog on YouTube for the next test.