Is Claude Code Free? Plans, Trials and API Costs
Is Claude Code free? Installing it costs nothing, but the Free plan doesn't include it. Compare Pro, Max, Ultra, trials and pay-per-token costs per session.
GoiAPI · · 13 min read
Ask AI and more

Claude Code is not free to use. The software itself costs nothing to download and install, but the Claude Free plan doesn't include Claude Code. To use it you need a Pro ($20/month), Max ($100), Ultra ($200), Team or Enterprise plan, or you pay per token through an API account. Anthropic's API has no free tier either, and new API accounts get no free credits. The only no-cost ways to use Claude models are a 7-day guest pass from an existing subscriber and Anthropic's program for open source maintainers.
This guide covers what is actually free, which "free Claude Code" tips you'll find online still hold, and what Claude Code costs when you do pay. All plan prices, program terms and per-token prices were checked on December 5, 2026.
Quick answer: what's free and what you pay for
| Item | Cost | Notes |
|---|---|---|
| Downloading and installing Claude Code | $0 | Native installer, Homebrew, WinGet or npm |
| Using Claude Code on the Claude Free plan | Not possible | The Free plan doesn't include Claude Code |
| Pro, Max or Ultra plan | $20, $100 or $200 a month | Claude Code included, with usage limits |
| Team or Enterprise plan | Per seat | Claude Code included |
| Anthropic API (Claude Console account) | Per token | No free tier, no free credits, $5 minimum purchase by card |
| Another API service with a pay-per-token key | Per token | Price depends on the model you choose |
| A model running on your own machine (Ollama) | No API bill | You pay in hardware, and the model isn't Claude |
Sources: Claude pricing, the Claude Code setup docs and Anthropic's API pricing, all checked December 5, 2026.
Does the Claude Free plan include Claude Code?
No. The Claude Code setup docs say it requires a Pro, Max, Ultra, Team, Enterprise or Console account, and that the free claude.ai plan does not include Claude Code access. The feature table on claude.com/pricing agrees: the Claude Code row reads "No" for Free and "Yes" for Pro, Max and Ultra (checked December 5, 2026).
You can install it on a Free account, but you can't use it until you upgrade, log in with a Console (API) account that has credits, or point Claude Code at another API with environment variables (covered below). Some older articles claim the Free plan gets a few Claude Code prompts every five hours; Anthropic's docs say otherwise today.
"Free Claude Code" tips online: which still work
Search for this question and you'll find lists of ways to use Claude Code for free. We checked the common ones against Anthropic's own pages on December 5, 2026:
| Tip | Status on December 5, 2026 | What to know |
|---|---|---|
| New API accounts get about $5 in free credits | No longer true | Anthropic's pricing page says the Claude API has no free tier or self-serve trial, and new accounts don't include free credits |
| 7-day guest pass | Available | Sent by an eligible Pro, Max or Ultra subscriber. You must be new to paid plans and enter payment details; it converts to paid Pro unless you cancel |
| Claude for Open Source program | Available | 6 months of Ultra for qualifying maintainers and contributors. You apply and wait for approval |
| Free models on other services, or local models | Works, with limits | Not Claude models. Anthropic doesn't support them in Claude Code, and quality and limits vary |
| Cheap shared Pro or Max accounts | Avoid | You don't own the account, and whoever does can read what you send |
The 7-day guest pass
Per Anthropic's Help Center article on guest passes (checked December 5, 2026):
- Eligible Pro, Max and Ultra subscribers get a limited number of passes. They can see them in Claude Code with the
/passescommand and share a referral link. - The recipient gets seven days of the Pro plan at no cost, including Claude Code.
- Recipients must be new to Claude paid subscriptions and must enter payment information when signing up. They aren't charged if they stop within seven days. If they don't cancel, the trial converts to a paid Pro plan.
So a guest pass is a trial, not a long-term way to use Claude Code.
Claude for Open Source
Anthropic's Claude for Open Source page (checked December 5, 2026) offers 6 months of Claude Ultra to people who meet one of several criteria. Examples include maintaining packages with 200,000 or more combined monthly downloads across registries such as npm or PyPI, or having authored 100 or more merged pull requests in repos you don't own in the last 12 months. You apply, and Anthropic decides. When the 6 months end, a previous paid plan resumes at its old rate unless you cancel, otherwise the account goes back to the Free plan.
Paid ways to use Claude Code
If neither program fits, you pay in one of two ways: a monthly plan with usage limits, or per token with no plan limits.
Subscription plans
From claude.com/pricing, checked December 5, 2026. Prices are in USD and don't include tax:
| Plan | Price | Claude Code |
|---|---|---|
| Free | $0 | Not included |
| Pro | $20/month, or $17/month billed yearly ($200 up front) | Included |
| Max | $100/month, 5x Pro usage | Included |
| Ultra | $200/month, 10x Pro usage per week, no 5-hour limit on verified accounts | Included |
| Team | Standard seat $20/seat/month yearly or $25 monthly | Included |
Anthropic describes plan usage in multiples of Pro, not in tokens, so you only learn whether a plan is enough by using it. When a limit runs out mid-task, you wait for the reset or pay extra; Claude Code usage limit reached explains each message and your options. To work out whether Max or Ultra pays off for your usage, see Claude Code Max vs API: which costs less per month.
Pay per token through an API
There's no monthly fee: a quiet month costs little, and a month without coding costs nothing. Two common options:
- An Anthropic Console account. Buy credits by card, minimum $5. Claude Opus 5.5 costs $4 per million input tokens and $20 per million output tokens (Anthropic pricing, checked December 5, 2026).
- An API service such as GoiAPI. One key works with Claude, GPT, DeepSeek and GLM models. You top up with USDT (TRC20 or BEP20) or Binance Pay, with no credit card. Top-ups are final and non-refundable, so add only what you expect to use. If card payments are your blocker, using the Claude API without a credit card compares the options.
GoiAPI prices per 1 million tokens, from the model pages, checked December 5, 2026:
| Model | Model ID | Input | Output | Cache read | Cache write |
|---|---|---|---|---|---|
| Claude Opus 5.5 | claude-opus-5-5 | $0.442 | $2.21 | $0.0221 | $0.8775 |
| Claude Haiku 5.5 | claude-haiku-5-5 | $0.0221 | $0.1105 | $0.00221 | $0.04388 |
| DeepSeek V4 Pro | deepseek-v4-pro-0813 | $0.1441 | $0.4324 | $0.0145 | $0.1802 |
| DeepSeek V4.1 Flash | deepseek-v4.1-flash | $0.04084 | $0.1225 | $0.004066 | $0.05105 |
| GLM 5.3 | glm-5.3 | $0.1441 | $0.4324 | $0.0145 | $0.1802 |
| GLM 5.3 Flash | glm-5.3-flash | $0.04084 | $0.1225 | $0.004066 | $0.05105 |
Each request that returns content has a small minimum charge. A request that fails without returning any content is not charged, unless you cancel it yourself. GoiAPI's Claude lineup is Opus 5.5 and Haiku 5.5; Claude Sonnet is not available.
What a Claude Code session costs on pay-per-token
Measured: one tiny turn
On December 3, 2026 we ran Claude Code 2.1.325 in non-interactive mode (claude -p) in an empty folder, on Claude Haiku 5.5 through GoiAPI, and asked a one-line arithmetic question. Claude Code reported 10,679 input tokens, 15,574 cache-write tokens and 3 output tokens. At the Haiku 5.5 prices above, that is about $0.00092 by our own calculation.
Even the smallest question starts above 10,000 input tokens, because Claude Code sends its system prompt and tool definitions with every turn. Also note that the total_cost_usd figure Claude Code prints is computed at Anthropic's list prices. It is not what GoiAPI deducts; the Request history page in the dashboard shows the real charge.
Estimated: a 40-turn session
The table below is a calculation on assumptions, not a measurement: one session of 40 requests, each with 30,000 input tokens and 800 output tokens. The "80% cached" column assumes 80% of input is billed at the cache-read price. Prices as checked December 5, 2026; cache writes and the per-request minimum charge are left out.
| Model and price list | No cache, per session | 80% cached, per session |
|---|---|---|
| Claude Haiku 5.5 on GoiAPI | about $0.030 | about $0.011 |
| DeepSeek V4.1 Flash or GLM 5.3 Flash on GoiAPI | about $0.053 | about $0.018 |
| DeepSeek V4 Pro or GLM 5.3 on GoiAPI | about $0.19 | about $0.062 |
| Claude Opus 5.5 on GoiAPI | about $0.60 | about $0.20 |
| Claude Opus 5.5 at Anthropic API rates | about $5.44 | about $1.79 |
How it's calculated, using Opus 5.5 on GoiAPI with no cache: 30,000 × $0.442 ÷ 1,000,000 = $0.01326 for input, plus 800 × $2.21 ÷ 1,000,000 = $0.00177 for output, so about $0.0150 per request and $0.60 for 40 requests.
Two things to keep in mind:
- The model matters more than the number of turns. The same session on Opus 5.5 costs about 20 times as much as on Haiku 5.5. On GoiAPI's price list, Haiku 5.5 also has a lower unit price than both Flash models, so if you want to spend less and stay on Claude, try Haiku first.
- The cache ratio is an assumption, and thinking tokens are billed as output.
For monthly estimates at light, moderate and heavy use, see the Claude Code Max vs API comparison. To run the numbers for your own usage, use the cost calculator.
Run Claude Code on a lower-cost model
Claude Code reads the API address, key and model name from environment variables, so you can point it at another model without a subscription. With GoiAPI on macOS or Linux:
export ANTHROPIC_BASE_URL="https://api.goiapi.com"
export ANTHROPIC_AUTH_TOKEN="sk-..."
export ANTHROPIC_MODEL="claude-haiku-5-5"
claudeOn Windows PowerShell:
$env:ANTHROPIC_BASE_URL = "https://api.goiapi.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-..."
$env:ANTHROPIC_MODEL = "claude-haiku-5-5"
claudeSwap claude-haiku-5-5 for claude-opus-5-5, deepseek-v4-pro-0813, glm-5.3 or another ID from the models page. The base URL has no /v1 at the end; Claude Code adds /v1/messages itself. The full setup for Windows, macOS and VS Code is in our Claude Code API key guide and the Claude Code integration docs.
Before you switch:
- Anthropic doesn't support non-Claude models in Claude Code. In our December 3, 2026 test, Claude Code printed an
[claude-code:unrecognized_model]warning with GLM and DeepSeek models but still answered a short question correctly. We haven't run long sessions with file edits on those models, and haven't run the two Flash models in Claude Code at all, so try them on a scratch branch first. GoiAPI's docs recommend Claude models for Claude Code. - To give each kind of task its own model, use Claude Code Router; see Claude Code Router with GPT, DeepSeek and GLM.
- A pay-per-token key still has limits. On GoiAPI each key has a per-minute request limit (going over returns
429), and requests stop with402when your balance can't cover them. Details are in limits and balance.
Run Claude Code on a local model with Ollama
This is the only long-term option with no API bill, but you pay in hardware and quality. Per Ollama's Claude Code docs (checked December 5, 2026), once Ollama is installed and a model is pulled, you point Claude Code at your own machine:
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
export ANTHROPIC_BASE_URL=http://localhost:11434
claude --model qwen3.5Ollama's docs recommend a context window of 64k tokens or more for larger repositories, which needs plenty of RAM or VRAM. A local model isn't Claude, is usually weaker on long multi-step tasks, and isn't supported by Anthropic. We haven't tested this setup; the commands come from Ollama's docs.
Already paying? Spend less per task
Whether you're on a plan or an API key, most Claude Code tokens are context sent again on every turn. Run /clear between unrelated tasks, /compact when a session gets long, and pick Haiku for small jobs and Opus for hard ones. Each tip, with its token and dollar effect, is in how to reduce Claude Code token usage. If you see "prompt is too long", read Claude Code "prompt is too long": how to fix it.
Avoid shared accounts and leaked keys
Some sellers offer Claude Code through a Pro or Max account shared among many buyers. You don't own the account, the seller can read your chats and code, and it can be locked at any time with no way to appeal. Anthropic's Consumer Terms forbid sharing your login. "Free Claude API keys" posted publicly are no better: the key belongs to someone else, can be revoked at any moment, and your code passes through an account you know nothing about.
Which option fits you
| You are | A sensible choice |
|---|---|
| Trying Claude Code for a few days before deciding | A guest pass if someone invites you (cancel in time if you won't continue), or a small pay-per-token top-up |
| A maintainer of a widely used open source project | Apply to Claude for Open Source |
| Using Claude Code with Opus every day, with a card | Pro or Max |
| Coding in bursts, busy one week and quiet the next | Pay per token, picking the model per task |
| Without a credit card | Pay per token through a service that takes crypto |
| Mostly fixing small bugs and writing scripts | Haiku 5.5 or a Flash model through an API |
| Not allowed to send code off your machine | A local model through Ollama, accepting lower quality |
FAQ
Is there a free version of Claude Code?
Not one you can use long term. The software is free to install, but the Claude Free plan doesn't include Claude Code, and Anthropic's API has no free tier or free credits for new accounts (checked December 5, 2026). The no-cost options for Claude models are a 7-day guest pass (payment details required, cancel before it ends) or the Claude for Open Source program if you qualify. If a non-Claude model is acceptable, you can run a local model through Ollama with no API bill.
Do new Claude API accounts still get $5 in free credits?
No. As of December 5, 2026, Anthropic's pricing page says the Claude API has no free tier or self-serve trial, and new accounts don't include free credits. The minimum credit purchase is $5. Many older articles still mention the free $5.
What's the lowest-cost way to use Claude Code?
It depends on how you use it. With uneven usage, paying per token usually costs less than a monthly plan because there's no fixed fee. By the calculation above, a 40-turn session costs about $0.011 to $0.030 on Haiku 5.5 through GoiAPI and about $0.20 to $0.60 on Opus 5.5. If you run Opus for hours every day, Max or Ultra may work out better, but you'll only know after trying, because Anthropic doesn't publish plan limits in tokens.
Can I get a refund on a GoiAPI top-up?
No. Top-ups are final and non-refundable (see the refund policy). Start with a small amount, use Claude Code for a few days, check the real cost on the Request history page, then top up more if you need it.
Start with a small amount
If you choose pay-per-token: create a GoiAPI account, top up a small amount with USDT (TRC20 or BEP20) or Binance Pay, create an API key and set a spending limit on it. Then run Claude Code with claude-haiku-5-5 first to see what a day of your work actually costs. The quickstart walks through each step.
GoiAPI sells API access to the models mentioned in this article. It does not sell Claude subscriptions.


