Claude Code pricing looks simple until you try to choose a way to pay. You can use Claude Code through a Claude subscription or connect it to Anthropic’s API, but those options follow different billing rules. A fixed monthly plan does not include API credits, and an API key can create a separate bill even when you already pay for Pro or Max.
This guide breaks down the Free, Pro, Max 5x, Max 20x, and API options, including what the advertised prices cover, how usage limits work, and what happens when you run out. It also shows you how to check which billing route Claude Code is using before a long coding session becomes an unexpected expense.
Before you subscribe, ask one practical question: do you need Claude Code itself, or do you mainly need AI help with code? Claude Code is built to work in a terminal and act on a codebase. If you want browser-based coding help or a simple way to compare answers from different AI models, GLBGPT provides another starting point without requiring a command-line setup. These are different use cases, so this guide keeps them separate rather than presenting one as a complete replacement for the other.
Quick Answer: How Much Does Claude Code Cost?
The prices above come from Anthropic’s individual plan guide. The word 包含 does not mean unlimited. Subscription access is controlled by usage limits, while API access creates token-based charges in the connected Console account.

偶爾使用
$200 when billed yearly
How Claude Code Pricing Works
There are two billing systems to understand. A Claude subscription gives eligible users access to Claude Code under the plan’s usage allowance. API access bills the Anthropic Console account or organization connected to the credentials used by Claude Code.
With a subscription, you pay a predictable recurring fee. Anthropic states that Pro and Max usage is shared across Claude on the web, desktop, and mobile apps and Claude Code. A long terminal session can therefore leave less capacity for Claude elsewhere, and activity in Claude’s other apps can reduce what remains for Claude Code.

With the API, the cost is variable. A short request that reads a few files and returns a compact patch may use little, while an agentic task that repeatedly searches a repository, invokes tools, and carries a long context can use much more. Team and Enterprise plans add organization-level administration, but their seat pricing and entitlements belong in Anthropic’s business-plan documentation rather than the individual comparison here.
Is Claude Code Free? Free Plan Access and Limits
Anthropic’s current individual-plan table includes a $0 Free plan, but the official Claude Code support article we verified specifically documents access through Pro and Max. Do not assume that a Free chat account automatically has the same Claude Code entitlement. Free access can depend on current product policy and account availability, so check the Claude Code sign-in flow and live plan page before relying on it.
If Free access is available to your account, use it to test installation, authentication, and one small code change. It is not a dependable allowance for daily repository work, and it does not automatically give you Anthropic API credits. Upgrade when resets repeatedly interrupt real work; use the API only after you understand its separate spending controls.
Claude Code Pro Plan: Price, Features and Limits
Claude Pro 成本 $20 per month or $200 when billed annually. Anthropic’s Claude Code plan guide says Pro subscribers can use Claude Code with the same credentials they use for Claude. You do not buy a separate Claude Code subscription.
Pro is a practical entry plan for focused individual work: investigating a bug, editing a small project, writing tests, explaining unfamiliar code, or completing several bounded changes each week. The monthly price is easier to budget than an open-ended API account.
The tradeoff is capacity. Claude Code reads files, follows references, keeps conversation history, and may call tools more than once before completing a task. Your effective usage therefore depends on the codebase, model, task, context length, and activity in other Claude products—not only on the number of messages you send.
Claude Code Max Pricing: 5x vs 20x
Claude Max has two individual tiers: Max 5x at $100 per month 和 Max 20x at $200 per month. Anthropic describes them as 5x and 20x Pro capacity per session. They are higher-capacity subscriptions, not unlimited plans and not bundles of API credits.
Max 5x is for people who reach Pro limits often enough that waiting disrupts a normal workday. Max 20x offers more room for sustained use, large repositories, or longer agentic tasks. Neither tier guarantees uninterrupted access under every workload, and switching models does not restore a shared session or weekly allowance after it has been exhausted.
Claude Code API Pricing Explained
The Anthropic API does not charge one flat Claude Code fee. It charges for the model and token activity used during the session. Rates are model-specific and can change, so Anthropic’s live API pricing table is the controlling source for input, output, prompt-cache write, and prompt-cache read prices.

ANTHROPIC_API_KEY can route Claude Code to the API path even when you also pay for Pro or Max.Divide token totals by the unit stated on the price page, normally one million tokens. This formula is more reliable than saying a “bug fix costs $X,” because two bug fixes can require radically different amounts of repository reading and iteration. Anthropic’s current cost guide also notes that the dollar figure shown in /用法 is calculated locally from standard list rates and may differ from promotional or contracted billing; the Console usage page is authoritative for API charges.
Claude Code Usage Limits Explained
Subscription limits are not the same as API spending. A subscription restricts how much included Claude activity you can use within its usage windows. API use is metered by tokens and governed by the API account’s balance, rate limits, and spending controls.
For Pro and Max, usage is shared across Claude and Claude Code. The reset time and options shown to you are more useful than a fixed message-count estimate because usage depends on task size, model choice, context, tools, and concurrent work. Anthropic’s current Claude Code documentation says /用法 shows plan usage bars for subscribers and a session token/cost view for API users.

Separate authentication route
Token charges, not included plan usage
These behaviors use the allowance faster:
- Reading or searching a large codebase.
- Keeping a long conversation when the next task is unrelated.
- Requesting broad autonomous changes instead of bounded edits.
- Using a more resource-intensive model.
- Running several Claude Code sessions, subagents, or agent-team members.
- Continuing heavy activity in Claude’s web or desktop apps.
What Happens When You Reach the Limit?
When you exhaust a subscription allowance, Claude Code shows that the limit has been reached and tells you when it resets or which options are available. You can wait for the reset, upgrade from Pro to Max, enable usage credits when available, or move a time-sensitive workload to API billing.
- Wait for the allowance to reset. This adds no cost and is sensible when the task is not urgent.
- Upgrade the subscription. Moving from Pro to Max increases included capacity without metering every token as a separate API charge.
- Enable usage credits. Anthropic allows eligible paid plans to continue past included limits with additional usage, subject to the account’s settings and spend controls.
- Use the Anthropic API. This can keep work moving, but it creates pay-as-you-go charges in the connected Console account.
Before paying more, check whether the task can be restarted in a fresh, narrower session. A smaller context may reduce usage without changing plans.
Warning: Why You May Get API Charges Despite Having Pro or Max
ANTHROPIC_API_KEY environment variable is set, Claude Code uses that API key instead of the subscription login, producing API charges.
This is the most important billing check in the article. Subscription usage and Console API usage are separate systems. Before a long session, confirm whether Claude Code is signed in with your Claude subscription or using credentials connected to a Console organization.
- 奔跑
/用法and confirm whether you see subscription usage bars or an API session-cost view. - Check the Console usage page for new activity after one small test request.
- Review auto-reload and spending-limit settings before choosing extra API usage.
- Do not expose an API key in screenshots, support messages, source code, or logs.
- After changing authentication, confirm the active route again before resuming a large task.
If you see unexpected API charges, stop the session, identify the billed workspace or organization, and compare the timestamps with Claude Code activity. Contact Anthropic support for a billing dispute instead of guessing which route produced the charge.
How to Reduce Claude Code Costs and Usage
The best savings usually come from controlling context, not writing unnaturally short prompts. Give Claude Code enough information to do the task, but avoid carrying unrelated history into every new job.
- 使用
/clearbetween unrelated tasks so old context is not processed again. - Ask for one bounded result, such as fixing a failing test, instead of improving an entire repository.
- Point to the relevant folder, error, file, or acceptance criteria so Claude Code searches less.
- Use a lower-cost supported model for routine work and reserve more expensive models for tasks that need them.
- Avoid unnecessary parallel sessions, subagents, and agent-team members.
- For API use, set a workspace spending limit or prepaid budget and monitor the Console usage page.
- Check subscription usage and Console API spending separately; one view does not represent both systems.
A smaller, relevant context can also improve results. It is easier for the model to focus on the current bug when old decisions and unrelated files are not competing for attention.
Do You Need Claude Code—or Just Claude Models?
Claude Code is useful when you want an AI agent to inspect a repository, edit files, run approved commands, and work directly from a terminal or supported development environment. That local, tool-using behavior is the reason to choose it over a standard browser chat.
You may not need that setup if your main tasks are explaining a snippet, drafting a function, reviewing pasted code, brainstorming an architecture, or comparing how different AI models answer the same programming question. For those jobs, a browser-based multi-model platform can be simpler because there is no command-line installation or API-key configuration.
Claude Code Pricing FAQ
Is Claude Code free to use?
Claude has a $0 Free plan, but current Claude Code eligibility should be checked on the live account and plan pages. Do not assume the Free chat plan always includes the same Code access documented for Pro and Max.
Is Claude Code included with Claude Pro?
Yes. Anthropic says Pro subscribers can access Claude Code with their Claude credentials, subject to the plan’s shared usage limits.
How much does Claude Code Max cost?
Max 5x costs $100 per month and Max 20x costs $200 per month. These are subscription prices, not API prepayments.
Does Claude Max include API credits?
No. Max subscription capacity and Anthropic API billing are separate. An API key used by Claude Code can create API charges even when the user also has Max.
Do Claude and Claude Code share usage limits?
Yes for Pro and Max individual subscriptions. Activity across Claude apps and Claude Code draws from the shared plan allowance.
What happens when I reach my Claude Code limit?
You can wait for a reset, upgrade to a higher subscription tier, enable eligible extra usage, or switch to API billing. The screen shows the choices available to your account.
Why am I being charged for API usage if I have Claude Pro?
Claude Code may be using an API key instead of subscription authentication. Check /用法, the active login route, and Console usage records. Pro does not cover API charges.
Is a Claude subscription cheaper than the API?
They meter usage differently. A subscription gives you a predictable recurring price with limits; the API charges for actual tokens. Compare them with your own usage records rather than a generic task-cost estimate.

