Claude Code Max vs API: Which Costs Less Per Month?

Claude Code Max vs API: compare Pro $20, Max $100 and Ultra $200 with pay-per-token costs at light, moderate and heavy use, using measured token counts.

GoiAPI · · 21 min read

Ask AI and more
View as Markdown

Comparison card showing Claude Pro at $20, Max at $100 and Ultra at $200 per month next to a terminal counting Claude Code input and output tokens

If you run Claude Code with Opus for most of the working day and your usage stays inside the plan's limits, a Max ($100/month) or Ultra ($200/month) subscription usually costs less than paying Anthropic's API rates, which we estimate at about $286 a month for moderate Opus use. Pay-per-token API billing makes more sense when your usage is uneven, when you mostly use a smaller model like Haiku, or when you need Claude Code in scripts, CI or shared team budgets. The rest of this guide shows the numbers behind that answer, so you can check them against your own usage.

Plan and API prices were checked on December 5, 2026. GoiAPI, which publishes this guide, sells pay-per-token access to Claude Opus 5.5 and Claude Haiku 5.5. It does not sell Claude subscriptions or Claude Sonnet.

OptionMonthly costBest for
Claude Pro$20 ($17/month billed yearly)Moderate Claude Code use, plus the Claude apps
Claude Max$100Daily Claude Code users who keep hitting Pro limits mid-session
Claude Ultra$200Several hours of Claude Code every day
Anthropic APIPer token. Opus 5.5 at moderate use: about $286 (estimate)Teams that need Sonnet, or a direct contract with Anthropic
GoiAPIPer token. Moderate use: about $38.75 with Opus 5.5, about $2.18 with Haiku 5.5 (estimates)Uneven usage, pay with USDT, no card or monthly fee

The two API rows are estimates built on the assumptions in the monthly cost section, not measurements.

How Claude Code billing works: subscription vs. API

Claude Code is Anthropic's coding agent for the terminal and VS Code. You describe a task, and it reads your files, edits code and runs commands. Each step is a call to a Claude model, and models are priced per token: the chunks of text the model reads (input) and writes (output). If tokens are new to you, our guide on what AI API tokens are and what 1M tokens costs covers the basics.

You can pay for those calls in two ways:

  • Subscription (Pro, Max, Ultra). A fixed monthly price with usage limits that reset every 5 hours and every week. Anthropic describes the limits as multiples of Pro, not as token counts.
  • API billing. No plan limits. You pay for every token you use, so a quiet month costs little and a busy month costs a lot.

Which one Claude Code uses depends on your credentials, not on which plan you own:

  • If ANTHROPIC_API_KEY is set, Claude Code uses that key instead of your Pro, Max, Ultra, Team or Enterprise subscription, even when you are logged in. In interactive mode it asks you to approve the key once; in non-interactive mode (-p) it always uses the key (Claude Code environment variables, checked December 5, 2026). To go back to your subscription, run unset ANTHROPIC_API_KEY.
  • If you point Claude Code at a gateway with a gateway credential (ANTHROPIC_AUTH_TOKEN or apiKeyHelper), requests carry that credential instead of your claude.ai login. The subscription's usage limits don't apply, and the traffic is billed per token to whoever owns the credential (Claude Code LLM gateway docs, checked December 5, 2026).
  • Setting only ANTHROPIC_BASE_URL without a credential does not replace the subscription: your saved claude.ai login stays active, so its limits and billing apply.

A stray ANTHROPIC_API_KEY in your shell profile is the most common reason a Max subscriber suddenly sees API charges.

Claude plans that include Claude Code

Prices from claude.com/pricing, checked December 5, 2026. All prices are in USD.

PlanPriceClaude Code usage limitsMonthly API credits
Free$0Claude Code not includedNone
Pro$20/month, or $17/month billed yearly ($200 up front)"More usage than Free", per 5 hours and per weekNone
Max$100/month"5x Pro usage" per 5 hours and per week$100 (not usable in Claude Code)
Ultra$200/monthNo 5-hour limit on verified accounts, "10x Pro usage" per week$200 (not usable in Claude Code)
TeamStandard seat $20/seat/month yearly or $25 monthly; Premium seat $100 yearly or $125 monthlyStandard: more than Pro. Premium: 5x StandardUp to $500/month, pooled

Three things many comparison posts still get wrong:

  • "Max 20x" is now Ultra. The $200 plan is called Ultra and is described as 10x Pro usage per week with no 5-hour limit for verified accounts. If an older article says "Max 20x for $200", read it as today's Ultra price and check the current limits on the pricing page.
  • The Free plan does not include Claude Code. You need Pro, Max, Ultra, Team, Enterprise or an API account.
  • Limits are relative, not in tokens. Anthropic doesn't publish how many tokens a 5-hour window holds, so nobody can tell you in advance exactly how much work fits in a plan. You find out by using it.

Claude Code API cost per token

When Claude Code runs on API billing, four token types make up the bill:

  • Input: what Claude Code sends that is not cached.
  • Cache write: the first time a repeated prefix (system prompt, tool definitions, files already read) is stored in the prompt cache.
  • Cache read: later turns that reuse that cached prefix at a much lower price.
  • Output: what the model writes, including its thinking.

Claude Code uses prompt caching automatically, so in a real session cache reads are usually the largest number of tokens, and cache writes and output are the largest share of the bill.

Anthropic API prices

Source: Anthropic pricing docs, checked December 5, 2026. USD per 1 million tokens (MTok).

ModelInput5-min cache writeCache readOutput
Claude Opus 5.5$4$5$0.20$20
Claude Sonnet 5.5 (not on GoiAPI)$2$2.50$0.10$10
Claude Haiku 5.5 (prompts up to 100,000 tokens)$0.10$0.125$0.01$0.50
Claude Haiku 5.5 (prompts over 100,000 tokens)$0.50$0.625$0.05$2.50

Two notes from the same page: a 1-hour cache write costs 2x the input price instead of 1.25x, and Claude 4.7 and later models use a newer tokenizer that produces about 30% more tokens for the same text. Anthropic's API has no free tier, new accounts get no free credits, and the minimum credit purchase is $5 by card.

GoiAPI prices

Source: GoiAPI pricing, checked December 5, 2026. USD per 1 million tokens.

ModelInputCache writeCache readOutput
Claude Opus 5.5$0.442$0.8775$0.0221$2.21
Claude Haiku 5.5$0.0221$0.043875$0.00221$0.1105

Before you compare the two tables:

  • GoiAPI's Claude lineup is Opus 5.5 and Haiku 5.5. Claude Sonnet is not available.
  • Each request that returns content has a small minimum charge, which only affects very short requests. A request that fails without returning any content is not charged, unless you cancel it yourself.
  • You top up with USDT (TRC20 or BEP20) or Binance Pay. There is no credit card and no monthly fee. Top-ups are final and non-refundable, so add only what you plan to use.
  • Prices can change. Check the pricing page before you top up.

For a deeper look at Anthropic's per-token rates, batch discounts and long-context tiers, see our Claude API pricing guide.

How much Claude Code costs per month on the API

The hard part of choosing between a plan and the API is not knowing how many tokens you use. The table below is an estimate built on assumptions, not a measurement. Its job is to show how cost scales with usage and which token type drives the bill.

Assumed tokens per working day:

Usage levelUncached inputCache writeCache readOutput
Light: a few small tasks and bug fixes100,000200,0002,000,00050,000
Moderate: Claude Code for most of the working day500,0001,000,00010,000,000200,000
Heavy: several long sessions on a large codebase2,000,0003,000,00040,000,000800,000

Cost = tokens × price ÷ 1,000,000. A month here is 22 working days. The Anthropic column uses the 5-minute cache write price. The GoiAPI columns don't include the per-request minimum charge, so real costs will be slightly higher.

Usage levelOpus 5.5, Anthropic APIOpus 5.5 on GoiAPIHaiku 5.5 on GoiAPI
Light$2.80/day · about $61.60/month$0.37/day · about $8.24/month$0.02/day · about $0.46/month
Moderate$13.00/day · about $286/month$1.76/day · about $38.75/month$0.10/day · about $2.18/month
Heavy$47.00/day · about $1,034/month$6.17/day · about $135.71/month$0.35/day · about $7.76/month

How to read it:

  • Cache writes and output cost the most with Opus, even though cache reads are by far the largest token count. At the moderate level on GoiAPI, 10 million cache-read tokens cost $0.221 a day, while 1 million cache-write tokens cost $0.8775.
  • The model matters more than the usage level. Haiku costs a small fraction of Opus for the same tokens, but it is weaker on hard problems. A common pattern is Opus for planning and tricky bugs, and Haiku for routine edits.
  • The moderate estimate lines up with Anthropic's own numbers. Anthropic's Claude Code cost guide (checked December 5, 2026) says that across enterprise deployments the average is around $13 per developer per active day and $150 to $250 per developer per month, with 90% of users below $30 per active day.
Bar chart of one moderate day of Claude Code with Opus 5.5 on GoiAPI: cache writes $0.8775, output $0.442, cache reads $0.221 and uncached input $0.221, totaling $1.7615
Estimate from assumed usage: cache reads are the most tokens, but cache writes and output are most of the money.

To plug in your own numbers, use the GoiAPI cost calculator: enter tokens per request (input, output, cache read, cache write) and requests per day. The calculator counts a month as 30 days, while the table above uses 22 working days, so compare the per-day figures.

Measured: what one tiny Claude Code turn costs

On December 3, 2026 we ran Claude Code 2.1.325 in non-interactive mode, in an empty folder so it had no project to read, pointed at GoiAPI with Claude Haiku 5.5:

BASH
export ANTHROPIC_BASE_URL="https://api.goiapi.com"
export ANTHROPIC_AUTH_TOKEN="sk-..."
export ANTHROPIC_MODEL="claude-haiku-5-5"
claude -p "<a one-line question: what is 2+2?>" --output-format json

Claude Code answered "4". According to the usage it reported, that single turn used 10,679 input tokens, 15,574 cache-write tokens and 3 output tokens. At GoiAPI's Haiku 5.5 prices that works out to about $0.00092; at Anthropic's Haiku 5.5 list prices, about $0.0030. We calculated both figures ourselves from the token counts and price tables.

For comparison, a request sent straight to the API with a message containing just the letter "a" was billed 134 input tokens. The difference is the system prompt and tool definitions Claude Code attaches to every turn: even the smallest Claude Code task starts at more than 10,000 input tokens.

Bar chart comparing tokens billed for two tiny requests to Claude Haiku 5.5: 10,679 input plus 15,574 cache-write tokens through Claude Code, against 134 input tokens for a one-letter direct API call
Through Claude Code, a one-line question carries the full system prompt and tool list. A direct API call does not.

The lesson: don't estimate Claude Code costs from the price of a chat message. A real session reads files and runs many turns, so it uses far more tokens than this test. Watch the per-request cost on the Request history page of the dashboard for your first few days.

One more trap: the total_cost_usd figure Claude Code prints is computed locally at Anthropic list prices. It is not what GoiAPI charges. Use the Request history page for the amount actually deducted.

Why prompt caching keeps the bill down

That 10,000+ token prefix repeats on every turn, which is why prompt caching matters so much. The first time Claude Code sends it, the prefix is billed as a cache write; later turns read it back at the cache-read price. In a separate test on the same day, we sent the same long, cache-marked system prompt to Haiku 5.5 twice, two seconds apart: the second request read the entire cached block back instead of writing it again.

Two bars for Claude Opus 5.5 on GoiAPI: writing 1 million tokens to the prompt cache costs $0.8775, while reading the same 1 million tokens back from cache costs $0.0221
The same 1M-token prefix: written once at the cache-write price, then read back at a small fraction of it.

Caching only helps while the cache is warm. Claude Code's docs note that your first message after a break longer than the cache lifetime misses the cache and reprocesses your full context, so long idle gaps in a session cost more than steady work.

Break-even: when Max or Ultra beats the API

The simple formula is:

Plan price ÷ your API cost per active day = active days the plan has to cover to pay off.

Using the estimates above:

PlanOpus 5.5 at Anthropic API ratesOpus 5.5 on GoiAPIHaiku 5.5 on GoiAPI
Pro, $20About 7 light days, or 1.5 moderate daysAbout 53 light days, or 11 moderate daysAbout 200 moderate days
Max, $100About 36 light days, or 7.7 moderate daysAbout 57 moderate days, or 16 heavy daysAbout 280 heavy days
Ultra, $200About 15 moderate days, or 4.3 heavy daysAbout 32 heavy daysAbout 570 heavy days

These are divisions on assumed usage, before the per-request minimum charge. They also leave out the question that decides everything: does your usage fit inside the plan's limits? Anthropic doesn't publish limits in tokens, so the only way to know is to use the plan for a few weeks and note when you hit the 5-hour or weekly cap.

A subscription usually wins when:

  • You use Opus heavily and steadily every day and the work fits inside the plan limits. At Anthropic API rates, moderate daily Opus use passes the Ultra price within a month.
  • You want predictable spending. A fixed fee is easier to budget than a token bill.
  • You need Claude Sonnet, which GoiAPI does not offer.
  • You rely on features tied to a claude.ai account. For example, since Claude Code v2.1.196, Remote Control is disabled when ANTHROPIC_BASE_URL points at a host other than api.anthropic.com (source, checked December 5, 2026).
  • You need a data agreement signed directly with Anthropic. Use a plan or Anthropic's API.

Pay-per-token usually wins when:

  • Your usage is uneven. Busy weeks cost more, quiet weeks cost almost nothing, and there is no fee for the days you don't code.
  • You mostly use Haiku. Even the heavy Haiku estimate on GoiAPI (about $7.76/month) is below the Pro price.
  • You run Claude Code from scripts, CI or agents, or a team shares one budget with spending caps per key.
  • You want to mix models. Our guide to using Claude Code with GPT, DeepSeek and GLM models covers that setup.
  • You keep hitting the 5-hour limit and would rather pay for the overflow than wait.

API billing doesn't mean you can never be stopped, though. On GoiAPI a request can fail with 402 when your balance is too low, or 429 when you hit the key's per-minute request limit or a daily or monthly spending limit you set on the key. The test key we used returned x-ratelimit-limit-requests: 60, i.e. 60 requests per minute; other keys may differ. See limits and balance for how holds and limits work.

What to do when you hit your plan's limit

Anthropic doesn't sell token packs that top up a Pro, Max or Ultra allowance directly. If you are looking at a limit message right now, Claude Code usage limit reached: what it means and what to do explains each message. When a plan runs out mid-task, you have four options:

  • Wait for the reset. The 5-hour session limit resets every five hours and the weekly limit once a week. Verified Ultra accounts have no 5-hour limit, only the weekly one (Anthropic Help Center, checked December 5, 2026).
  • Turn on usage credits. Pro, Max and Ultra users can go to Settings > Usage, switch on Usage credits, add a payment method and buy credits. Usage past your plan limit, including Claude Code in the terminal, is then billed at standard API rates, so the Opus 5.5 row in the Anthropic table above applies. You can set a monthly spending limit. Usage credits don't change when your limits reset. Credits bought on or after December 7, 2026 expire 12 months after purchase; credits bought before that date don't expire. In Claude Code, /usage-credits opens the same settings page.
  • Upgrade. Pro to Max, or Max to Ultra.
  • Switch to pay-per-token. No plan limits; you pay for every token. You can buy credits in the Claude Console by card (minimum $5), or use a gateway such as GoiAPI and pay with USDT. If you don't have a card, our guide to using the Claude API without a credit card walks through the options.

Max and Ultra API credits don't cover Claude Code

Max includes $100 and Ultra $200 of monthly Claude API credits. According to Anthropic's page on API credits for Max, Ultra and Team plans (checked December 5, 2026):

  • The credits cover the Claude API, Claude Managed Agents, the Claude Agent SDK and the Console playground. Claude Code is listed as not covered, and so is extra usage in the Claude apps.
  • They expire at the end of each billing cycle and don't roll over.
  • They don't change your usage limits in Claude or Claude Code.
  • To claim them you link a Claude Console organization to your plan, and new subscribers can claim them after 7 days.

If a Console organization holds only these credits and you start a Claude Code session against it, Anthropic documents that Claude Code shows Credit balance too low · Add funds: https://platform.claude.com/spending/billing. So the credits are useful for your own apps and scripts, but they don't make a Max plan cheaper for Claude Code itself.

Don't buy shared or resold Claude accounts

You will find sellers offering "Claude Code tokens" or cheap Pro and Max seats that are really one account shared among many buyers. Before paying, know what you're accepting:

  • It breaks Anthropic's terms. The Consumer Terms (checked December 5, 2026) forbid sharing your login or making your account available to anyone else, and forbid reselling the service.
  • A ban means losing what you paid. Anthropic may suspend or terminate access, including subscriptions, at any time without notice, and a termination for violating the terms comes with no refund. As a buyer, you are not the account owner who can appeal.
  • Your data isn't private. Whoever holds the email and password can read your chat history, uploaded files and any code you paste, and can change the password whenever they like.
  • The limits are split. The 5-hour and weekly limits belong to one account. Five people on one Pro plan each get roughly a fifth.
Diagram of a shared Claude Pro account split across five users, next to four risks: breaking the terms, a ban with no refund, the seller reading chats, and split limits
A shared account splits the limits, exposes your data and can disappear without notice.

If the real need is "the whole team uses Claude", Anthropic's Team plan is built for that. If the need is "spend less", pay-per-token billing is the legitimate route.

How to switch Claude Code to pay-per-token billing

The full walkthrough for Windows, macOS and VS Code is in our Claude Code API key setup guide. The short version, from the GoiAPI Claude Code integration docs:

BASH
# macOS / Linux
export ANTHROPIC_BASE_URL="https://api.goiapi.com"
export ANTHROPIC_AUTH_TOKEN="sk-..."
export ANTHROPIC_MODEL="claude-opus-5-5"
claude
POWERSHELL
# Windows PowerShell
$env:ANTHROPIC_BASE_URL = "https://api.goiapi.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-..."
$env:ANTHROPIC_MODEL = "claude-opus-5-5"
claude

Things to know:

  • The base URL has no /v1. Claude Code adds /v1/messages itself. When we deliberately set https://api.goiapi.com/v1, Claude Code stopped with a 404 and this message: There's an issue with the selected model (claude-haiku-5-5). It may not exist or you may not have access to it. Run --model to pick a different model. The message blames the model, but the cause is the extra /v1. More fixes are in our Claude Code API error guide.
  • Use ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY, for a gateway key, and make sure no old ANTHROPIC_API_KEY is left in your environment.
  • Set the background model too. Some background tasks use the model the haiku alias points to, set with ANTHROPIC_DEFAULT_HAIKU_MODEL. When you run Opus interactively, also set ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-5-5" so those tasks use a model GoiAPI offers. In our non-interactive test with only ANTHROPIC_MODEL set, Claude Code reported a single model in modelUsage and no 404s, but we haven't checked a long interactive session.
  • Switch to Haiku by replacing claude-opus-5-5 with claude-haiku-5-5.
  • Check where your settings come from with /status inside Claude Code before starting heavy work.
  • Cap your spend. Set a daily or monthly spending limit on the key on the API Keys page, then check the Request history page after a few commands to see tokens and cost per request. That's the fastest way to find out which usage level in the table above you're at.

If Claude Code reports an authentication error instead, see Claude Code invalid API key: causes and fixes.

FAQ

Is Claude Max worth it for Claude Code?

It is if you use Opus heavily most working days and your work fits inside the Max limits. By our estimate, moderate Opus use at Anthropic API rates costs about $13 per active day, so Max ($100) pays for itself in about 8 such days a month. If you code in bursts, mostly use Haiku, or keep hitting the 5-hour limit anyway, pay-per-token is often the better fit.

Can you use Claude Code on the Free plan?

No. The Free plan doesn't include Claude Code. You need Pro, Max, Ultra, Team, Enterprise or an API account. Anthropic's API has no free tier and no free credits for new accounts; the minimum credit purchase is $5.

What happened to Claude Max 20x?

The $200/month plan is now called Ultra. It is described as 10x Pro usage per week, with no 5-hour limit for verified accounts. Max at $100/month is 5x Pro usage per 5 hours and per week.

Can I use the Max or Ultra API credits for Claude Code?

No. Anthropic lists Claude Code as not covered. The $100 (Max) or $200 (Ultra) monthly credits work for the Claude API, Claude Managed Agents, the Claude Agent SDK and the Console playground, they expire each billing cycle, and they don't raise your Claude Code limits.

Does an API key override my Claude subscription in Claude Code?

Yes. When ANTHROPIC_API_KEY is set, Claude Code uses it instead of your subscription, after a one-time approval in interactive mode and always in -p mode. A gateway credential in ANTHROPIC_AUTH_TOKEN also replaces the claude.ai login, and those requests are billed per token instead of counting against your plan limits.

How many tokens does Claude Code use per day?

There is no fixed number: it depends on the size of your codebase and how much you delegate. The one hard measurement in this guide is the smallest possible turn: 10,679 input tokens, 15,574 cache-write tokens and 3 output tokens. Our light, moderate and heavy assumptions range from about 2.35 million to 45.8 million tokens per day, cache reads included. To find your own number, use Claude Code for a few days and add up the token counts on the Request history page.

Can I buy more Claude Code usage on a Pro or Max plan?

Not as a token pack added to the plan. Inside the plan, the supported way is usage credits, billed at standard API rates once you pass your limit. Outside the plan, you pay per token through an API: the Claude Console by card, or a gateway like GoiAPI with USDT. Either way, set a spending limit on the key so a long session can't surprise you.

How long does $20 last on pay-per-token?

At GoiAPI prices checked December 5, 2026, $20 covers about 53 light days or 11 moderate days of Opus 5.5, or about 200 moderate days of Haiku 5.5, based on the assumptions above and before the per-request minimum charge. That doesn't tell you whether Pro's limits would cover the same work; only trying it does.

Get started with pay-per-token Claude Code on GoiAPI

Want to test pay-per-token before committing to a monthly plan? Create a GoiAPI account, top up a small amount with USDT (TRC20 or BEP20) or Binance Pay, and create an API key. Set ANTHROPIC_BASE_URL to https://api.goiapi.com as shown above, put a daily spending limit on the key, and use Claude Code for a few days of real work. The Request history page will show what your usage actually costs. Top-ups are final and non-refundable, so add only what you plan to use. The quickstart covers each step.

Related posts