HomeClaude Code › Pricing & limits
OverviewInstallCLI referencePricing & limitsAgent SDKSkills & pluginsGitHubWeb, desktop & IDEModelsErrorsOpen source?TutorialFor studentsQA automation中文指南
Last updated: September 22, 2026

Claude Code pricing and limits, explained

Claude Code has no price of its own. What you pay is whatever sits underneath it: an API balance billed per token, or a Claude subscription with a usage ceiling. Understanding which one you are on — and why the tool is so token-hungry — is most of the answer to "why was that so expensive?"

TLDR

  • On the API you pay list price per million tokens for whichever model is active; the models guide has the current rates.
  • Every turn resends the whole conversation, so a long session costs quadratically more than a short one. /compact is the fix.
  • Pro and Max bundle usage with a rolling cap; heavy agentic sessions hit it fast.
  • On this gateway: credits at 7.69× face value ($13 buys $100 of usage, 87% off), or a flat-rate unlimited plan from $1.

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.69× face value ($13 for $100 of usage), or as a flat-rate unlimited plan from $1 for the period.

How the meter runs

Claude Code is stateless between turns. Turn ten sends turns one to nine plus every file it read and every tool result — so input tokens dominate, and they grow with the session. Subagents each carry their own context, and an agent that reads a large file re-sends that file on every subsequent turn until you compact. A single ambitious refactor can cost several dollars at list price on a frontier model.

Three ways to pay

1. Anthropic API (pay per token)

Set an Anthropic console key and every call bills at the model's list rate. Precise, unlimited by budget, and the most expensive per token.

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:

PlanDurationPrice
Unlimited 1 Hour1 hour$1
Unlimited 24 Hours24 hours$10
Unlimited 1 Week1 week$49
Unlimited 15 Days15 days$89

All unlimited plans →

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.

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

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?

Because every turn resends the whole conversation, including every file it read. Long sessions on a frontier model without /compact are the usual cause.

Is there a free way to run Claude Code?

The tool is free; usage is not. There is no free credit here — your first crypto top-up is doubled (+100%) — 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.69× face value — or a flat-rate unlimited plan.

Get an API key See unlimited plans

AI 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.

More Claude Code guides

Claude Code: the complete guideHow to install Claude CodeClaude Code CLI documentation: commands and flagsThe Claude Code SDK, now the Claude Agent SDKClaude Code skills and pluginsClaude Code in GitHub: the App, the Action and @claudeDoes Claude Code have a web interface? Web, desktop and IDE explainedWhich model Claude Code uses, and how to change itClaude Code errors and how to fix themIs Claude Code open source?Claude Code tutorial: your first real sessionClaude Code for studentsHow to use Claude Code for QA automationClaude Code 怎么用:从安装到日常使用