Is Claude Code free?
The program is free — install it from npm or the native installer and nothing is charged. What is not free is the model behind it: every turn is an API call, billed per token, or drawn from a Claude Pro/Max allowance. There is no free tier of Claude Code usage, and a Claude.ai free account does not unlock it. People asking "how to use Claude Code for free" usually end up at one of three answers: a subscription they already pay for, a small API balance, or a gateway that sells the same usage below face value.
How much is Claude Code?
Three price tags depending on the route. Claude Pro is $20 a month and Max $100 or $200 a month, each with a rolling usage cap that agentic sessions reach quickly. On the API there is no monthly fee: a focused hour on the Sonnet tier typically costs a few dollars at list price, and Opus roughly two and a half times that — a long autonomous refactor without /compact can cost more than a day of a subscription. On this gateway the same API usage is bought at 7.69231× face value ($13 for $100 of usage), or as a flat-rate unlimited plan from $0.80 for the period.
How the meter runs
Long conversations can increase the context processed on later requests. Prompt caching, compaction and tool-result handling affect how that context is processed and billed. Subagents also consume tokens. Compare input, output and cache usage for a representative task in Claude Code and check the provider billing dashboard for the authoritative charge. See Anthropic’s cost-management guide for current behavior.
Three ways to pay
1. Anthropic API (pay per token)
Use an Anthropic Console API key for metered API billing. Charges depend on the model and billable token categories, including cache usage. Account balance, spend limits and API rate limits still apply. Compare actual workload costs with the other options rather than assuming one route is always the most expensive.
2. Claude Pro or Max subscription
Sign in with /login and Claude Code draws on the subscription's usage allowance instead of an API balance. The allowance is a rolling cap, and Max exists in tiers precisely because Claude Code users exhaust Pro. It is a good fit for moderate daily use, and a frustrating one for long autonomous sessions, where the cap arrives mid-task.
3. This gateway
Same models, same API, billed against a balance you bought below face value: $13 of payment becomes $100 of usage at list rates, i.e. 87% off. For heavy use there are flat-rate unlimited plans with no per-token billing at all:
| Plan | Duration | Price |
|---|---|---|
| Unlimited 1 Hour | 1 hour | $0.80 |
| Unlimited 24 Hours | 24 hours | $8 |
| Unlimited 1 Week | 1 week | $37 |
| Unlimited 15 Days | 15 days | $67 |
Point Claude Code at it with ANTHROPIC_BASE_URL=https://aiprimetech.io and a gateway key. Nothing else in your setup changes — /compact, subagents, MCP, skills and hooks all keep working.
Claude Code Max: what the Max plan changes
Claude Max is the subscription built for Claude Code: the $100 tier carries roughly five times Pro's usage and the $200 tier about twenty times, on the same rolling-window cap. For an individual running a few agentic sessions a day it is the simplest answer and often the cheapest.
If a plan limit interrupts your work, compare the subscription, metered API and gateway options using a representative workload. Model choice, context length, output size, cache reuse and parallel agents can change the cost substantially. There is no universal two- or three-hour break-even point. Check current plan limits and your measured usage before choosing a route.
Rate limits
Three limits apply at once: requests per minute, tokens per minute and concurrent requests. Claude Code trips the third one first, because streaming responses hold a slot for their whole duration and subagents run in parallel. A 429 means back off; a 529 means the model is saturated for everyone. The errors guide covers both. New gateway accounts start with conservative concurrency that is raised on request.
Cutting the bill without changing tools
- Run
/compactat every change of direction; run/clearbetween unrelated tasks. - Keep the default on the Sonnet tier and switch to Opus only for the hard step (
/model). - Write a good CLAUDE.md so the agent stops re-discovering the project every session.
- Use
--allowedToolsin scripts so it never burns turns asking for permission. - Check
/costbefore a long task and decide whether the session is worth compacting first.
Frequently asked questions
Is Claude Code included in Claude Pro?
Yes — sign in with /login and it uses the subscription's usage allowance, subject to the rolling cap. API-key use bills separately.
Why did one Claude Code session cost so much?
Session cost depends on the selected model, input and output tokens, context length, prompt-cache usage and parallel agents. Review the usage breakdown and billing dashboard before attributing the cost to a single cause.
Is there a free way to run Claude Code?
The tool is free; usage is not. There is no permanent free tier here — when a welcome code for new accounts is running it is shown in the box on this page, and your first crypto top-up is doubled (+50%) — and the cheapest sustained option is the hourly unlimited plan.
What is the cheapest way to run Claude Code all day?
A flat-rate unlimited plan: a fixed price for the period, no per-token billing, fair-use limits only.
Run Claude Code on the gateway
Same models, two environment variables, credits at 7.69231× face value — or a flat-rate unlimited plan.
Get an API key See unlimited plansAI Prime Tech is an independent API gateway and is not affiliated with, endorsed by, or sponsored by Anthropic. “Claude” and “Claude Code” are trademarks of Anthropic. Claude Code features described here follow Anthropic’s public documentation at the time of writing and change frequently; prices and model lists on this page are read from this gateway’s live settings.