Claude Code is not free. The CLI installs at no cost, but the Free Claude plan does not include it, so you need a paid plan, starting with Pro at $20 a month ($17 a month billed annually), or API credits. The only way to run it for $0 is to point it at a local model through Ollama, which works but is not supported by Anthropic. Qualifying open-source maintainers can also get six months of Claude Ultra for free.
This guide lists every route as of November 2026: what each plan includes, the free programs, running Claude Code on local or cheaper models, and free agents to use instead or alongside.
What Claude Code costs
| Plan | Price | Claude Code |
|---|---|---|
| Free | $0 | Not included |
| Pro | $20/month, or $17/month billed annually | Included |
| Max | $100/month | Included, about 5x Pro usage |
| Ultra | $200/month | Included, the highest individual limits |
| Team | $25/seat (Standard) or $125/seat (Premium) a month; $20 or $100 billed annually | Included |
| Enterprise | $20/seat a month, billed annually, 20 seats minimum | Included |
| API credits | Pay per token | Works with an API key |
Two details catch people out. The tier above Max is now called Ultra. And the monthly API credits that come with Max, Ultra and Team do not cover Claude Code; they are for the API only. Our Claude Code pricing guide compares the plans, and Claude Max vs Ultra covers the top two.
Free programs that include Claude Code
- Open-source maintainers: Anthropic’s Claude for Open Source program gives six months of free Claude Ultra to people who meet one bar: for example 500 or more dependent repositories, 200,000 or more monthly downloads, 100 or more merged pull requests into other people’s repositories in the past 12 months, or an OpenSSF criticality score of 0.4 or higher. Applications were open in November 2026.
- Startups: the startup program offered $1,000 in API credits and a year of Team, but a notice from 13 October 2026 says the current cohort is full.
- Students: there is no free individual plan. Claude for Education is sold to universities, and the Campus Program is closed for fall 2026. If your university has a Claude for Education agreement, ask whether it includes Claude Code.
Running Claude Code on a free local model
Claude Code talks to whatever server ANTHROPIC_BASE_URL points to. Since version 0.14 (January 2026), Ollama speaks the Anthropic API, so Claude Code can run against a model on your own machine.
The quick way, with Ollama 0.15 or later:
ollama launch claude
Or set it up yourself:
export ANTHROPIC_BASE_URL=http://localhost:11434
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
claude --model <local-model>
What to expect:
- Pick a model with tool calling and a long context. Ollama recommends at least 32K of context, and 64K or more for real work. Claude Code assumes a 200K window.
- Quality drops. Claude Code’s prompts and tools are tuned for Claude. Small local models miss tool calls and lose track of long tasks more often; use them for routine edits, tests and docs.
- It is unsupported. Anthropic’s gateway docs say it does not support routing Claude Code to non-Claude models. Some features, such as Remote Control, turn off when the base URL is not Anthropic’s.
- Check what is active. A leftover
ANTHROPIC_API_KEYor claude.ai login can override your settings;/statusshows which one Claude Code is using.
Ollama’s cloud models are not free: they are paid per token or through Ollama’s own plan. For the hardware side of local models, see our guide to running a local LLM coding agent.
Cheaper endpoints: not free, but much less
Several model providers publish an Anthropic-compatible endpoint made for Claude Code. You set ANTHROPIC_BASE_URL to theirs and put their key in ANTHROPIC_AUTH_TOKEN:
| Provider | Base URL |
|---|---|
| DeepSeek | https://api.deepseek.com/anthropic |
| Moonshot (Kimi) | https://api.moonshot.ai/anthropic |
| Z.ai (GLM) | https://api.z.ai/api/anthropic |
| Alibaba Model Studio (Qwen) | https://dashscope-intl.aliyuncs.com/apps/anthropic |
| MiniMax | https://api.minimax.io/anthropic |
| OpenRouter | https://openrouter.ai/api |
None of these listed a free tier on their Claude Code pages in November 2026; you pay per token or through a coding plan. Their prices are often far below Claude’s, but the same caveat applies: Anthropic does not support them, and OpenRouter warns that Claude Code may not work correctly with providers other than Anthropic. Read each provider’s terms on where your code goes.
Free agents instead of Claude Code
If the goal is a coding agent for $0, other CLIs have free tiers or work with free local models without any workaround:
- Codex works with a ChatGPT Free account, with low limits.
- opencode, Aider, Cline and Qwen Code are free and run on local models through Ollama.
- Antigravity and Copilot have free tiers with their own caps.
The best free AI coding tools compares ten of them with their limits, and the best Claude Code alternatives covers paid options too.
Combining a paid plan with free tools
A common pattern is one Claude Pro plan for the hard problems and free tools for the rest: a local model for repetitive edits, Codex on ChatGPT Free for a second opinion, opencode for quick scripts. That keeps a $20 plan inside its limits.
AgentVera is a desktop app that runs these CLIs side by side in real terminals, each with its own login or local model. Put Claude Code on your Pro plan next to opencode on Ollama in the same workspace, see what each agent spends with token budgets, and stretch your plan with token savings, which trims what agents send.
The free plan runs 2 agents at once and includes MCP, Git, Docker, SSH, code review and token savings. Pro is $9.99 a month and has no agent limit; you can try Pro free for 7 days; cancel before it ends and you pay nothing. To try it, download AgentVera.
Wrapping up
Claude Code needs a paid plan or API credits; the cheapest is Pro at $17 to $20 a month. For $0 you can run it on a local model through Ollama, accepting weaker results and no support, or apply to the open-source program if you maintain a widely used project. Otherwise, a free agent such as Codex, opencode or Aider gets you most of the way, and the two combine well.
Sources: Claude pricing, Claude Code with Pro or Max, API credits for subscribers, Claude for Open Source, LLM gateway docs, environment variables, Ollama and Claude Code, OpenRouter guide.