Fully free Claude Code does not exist: the Free plan of Claude leaves it out. Three honest routes remain. The first is the starter API credits. The second is Anthropic's program for open source maintainers. The third is the agent itself running on free models from other vendors. Below are the terms of each, and the reason "free" repositories on GitHub are more dangerous than they look.
Can you get Claude Code for free
If you need Claude itself, no. On the pricing page Claude Code is missing from Free and appears only with Pro. The Claude Code documentation says the same: most surfaces need a Claude subscription or an Anthropic Console account. The list of sign-in methods has no Free either: it names Pro or Max, Team or Enterprise, Console, and cloud providers.
| Route | What you get | Terms | Is it Claude |
|---|---|---|---|
| Free plan on claude.ai | Chat, artifacts, search | Claude Code not included | yes, but no agent |
| Console starter credits | A small sum to test the API | Amount not stated in the docs | yes |
| Claude for Open Source | 6 months of Max 20x | Criteria for maintainers and contributors | yes |
| codexkey free models | Claude Code as a shell | A codexkey key, limits on the models page | no |
| Proxies like free-claude-code | Claude Code on top of providers' free tiers | Someone else's code between you and the model | no |
What Anthropic itself gives for free
First: the API pricing page in Anthropic's docs says new users get a small amount of free credits to test the API. It does not name the amount or the expiry. Also, the console, like all Anthropic products, works only in supported countries, and Russia is not on that list. The details are in the article on VPNs for Claude and account bans.
Second: the Claude for Open Source program gives 6 months of Max 20x at no cost. It is for you if any one of these holds:
- your packages have 500 or more dependent repositories, 100 or more dependent packages, or 200,000 or more downloads a month;
- you are listed as a committer or maintainer of a recognized project such as CPython, Rust or Kubernetes;
- in the last 12 months, 100 or more of your pull requests were accepted into other people's repositories;
- your repository has 20 or more external contributors with accepted pull requests;
- the project has an OpenSSF criticality score of 0.4 or higher.
After six months the account returns to its previous plan or to Free. The page does not say how long applications stay open, so check its current status. As of October 29, 2026, we found no free trial of Pro or Max in the official documentation.
Claude Code free GitHub: why "free" repositories are dangerous
The official install fits on one line. For macOS, Linux and WSL, the command from the documentation is:
curl -fsSL https://claude.ai/install.sh | bash
On Windows there is a PowerShell variant, irm https://claude.ai/install.ps1 | iex, as well as brew install --cask claude-code and winget install Anthropic.ClaudeCode. Anything that promises an "unrestricted" Claude Code should stay off your machine.
The reason is concrete. On March 31, 2026, Anthropic published Claude Code's client code by mistake: a source map in an npm package exposed about 513,000 lines of TypeScript. Two days later BleepingComputer described a fake repository from the user idbzoomh that advertised "enterprise features" for free. Its archive held an executable, ClaudeCode_x64.exe, that installed the Vidar infostealer and the GhostSocks proxy tool. The company Zscaler found the campaign, and the repository ranked in Google for queries like "leaked Claude Code".
A leak of the source code does not produce free tokens. Claude Code remains a client, and the answers are computed by the model on Anthropic's servers. The only person who profits from such a "build" is the one who uploaded it.
A separate case is the free-claude-code project on GitHub (owner Alishahryar1). It is open, licensed AGPL-3.0, and routes Claude Code and other agents to models from dozens of third-party providers. The README says so directly and calls the project independent of Anthropic. The method works, but you pay in another way: your requests and keys pass through someone else's proxy, and the answers no longer come from Claude. Before running it, check the owner, the license, and what the script does with your keys.
We would not search for "claude code api key free" at all. In our assessment, public free keys are either already revoked or stolen, and neither case helps you.
How to run Claude Code on a free model through codexkey
The codexkey catalog has three models with a zero price per token. The price list is as of October 29, 2026, and the terms and limits are on the models page:
| ID | Developer | Context | Max output |
|---|---|---|---|
deepseek-v4.1-flash-1017-free | DeepSeek | 1M | 131,072 |
minimax-m3-free | MiniMax | 1M | 32,000 |
qwen3.8-flash-free | Alibaba | 1M | 32,000 |
Three caveats apply. First, it is not Claude: the quality and working style of the agent will differ. Second, Anthropic says outright that it does not support pointing Claude Code at non-Claude models through gateways, so some features may behave differently. Third, the catalog leaves the tool-calling support field empty for these models, and the whole agent rests on it. So start with a small task.
The file ~/.claude/settings.json (on Windows %USERPROFILE%\.claude\settings.json) with a free model looks like this. Write the address without /v1, and keep every ANTHROPIC_DEFAULT_* line: otherwise Claude Code asks for its own models and fails with a model selection error.
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.codexkey.online",
"ANTHROPIC_AUTH_TOKEN": "sk_cdx_YOUR_KEY",
"ANTHROPIC_MODEL": "deepseek-v4.1-flash-1017-free",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek-v4.1-flash-1017-free",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-v4.1-flash-1017-free",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v4.1-flash-1017-free",
"CLAUDE_CODE_SUBAGENT_MODEL": "deepseek-v4.1-flash-1017-free"
}
}
We do not add the [1m] suffix. Without it Claude Code treats the model window as 200K and compresses the history near 190K, which saves your limits on a free model. All the variables are explained in the Claude Code guide. Whether you need a nonzero balance to call the free models, the public price list does not say, so check that on the model page too.
There is an option without Claude Code: OpenCode, an open agent under the MIT license (details in the article on installing OpenCode and choosing models). In the codexkey provider from the OpenCode guide, add the model, and do not delete the limit block:
"deepseek-v4.1-flash-1017-free": {
"name": "DeepSeek V4.1 Flash 1017 (Free)",
"limit": { "context": 1000000, "output": 131072 }
}
How do you tell whether a free model copes? Give it three tasks on your own repository: explain an unfamiliar module, fix a failing test, edit two files at once. Watch three numbers: whether the test passed on the first try, how many iterations it took, and how many tokens the /usage command showed. If the model goes in circles on the second task, there is no point in trying further.
Paid options on a small budget: what they cost per month
If free models fall short, the paid route often costs less than it seems. The calculation rests on an explicit assumption: a working day is 30M tokens of cache reads, 1.2M of fresh input (input written to the cache is priced as input), and 0.4M of output, with 22 working days in a month. The profile is conditional, built for comparison and not measured: the /usage command will show your real spend. codexkey prices as of October 29, 2026:
| Model | ID | Per day | Per 22 days |
|---|---|---|---|
| Claude Haiku 5.5 | claude-haiku-5.5 | $0.82 | $18.13 |
| DeepSeek V4.1 Flash | deepseek-v4.1-flash | $1.31 | $28.86 |
| Kimi K2.7 Code | kimi-k2.7-code | $1.76 | $38.72 |
| Claude Sonnet 5.5 | claude-sonnet-5-5 | $3.46 | $76.21 |
| Claude Opus 5.5 | claude-opus-5-5 | $5.76 | $126.72 |
For comparison, Pro costs $20 a month but runs into the five-hour windows we covered in the article on Claude limits. On this profile Haiku 5.5 fits within the Pro price, though in quality it is a different model from Sonnet and Opus. We give no benchmarks: run your own task on two models and compare the cost of a solved task. Tricks that cut spend by another factor of three are collected in how to cut your Claude Code bill. codexkey does not sell Claude Pro and Max subscriptions, and their prices are laid out in the article on Claude subscription prices.
When free models are not enough
Free models suit learning, small scripts and questions about code. We would still hand a large refactor across several files, long sessions, and tasks with subtle logic to Sonnet or Opus. The terms and limits of free models can change, so do not build a team workflow on them. And do not send them anything you cannot show a third-party provider: trade secrets, keys, personal data.
FAQ
Is Claude Code free?
No. The Claude Free plan does not include it, and Pro costs $20 a month on monthly billing. Claude Code also runs per token on API pricing through a Console account, and open projects can use the Claude for Open Source program with 6 months of Max 20x.
Is there a free trial of Claude Code?
As of October 29, 2026, we found no trial of Pro or Max in Anthropic's official documentation. For the API, the docs say new users get a small amount of free credits, and the sum is not given.
How do I use Claude Code for free?
There are three options: apply to Claude for Open Source if you are a maintainer or an active contributor; use the starter API credits in a supported country; or run Claude Code on free codexkey models. In the third case the answers come from DeepSeek, MiniMax or Qwen, not Claude.
Is it safe to download Claude Code from GitHub?
Only if it is Anthropic's own repository or you install with the command from the official documentation. In April 2026, fake repositories with "leaked" code infected computers with Vidar and GhostSocks. The install commands are in the Claude Code documentation, and one of them is shown above.
What is a free alternative to Claude Code?
OpenCode: an open agent under the MIT license that connects to the free models in the codexkey catalog. The other options are compared in the overview of Claude Code alternatives.
Does Claude Code work for free in Russia?
Free Claude Code does not exist anywhere, and Russia is not on the list of countries where Anthropic offers its products. What remains is a gateway API key paid in rubles and the free codexkey models as the "engine" for the agent.