Thanks to visit codestin.com
Credit goes to runapi.ai

Claude Code

Claude Code Pricing in 2026

There are four ways to pay for Claude Code: the free tier, the $20 plan (Pro), the $100 plan (Max), or a pay-as-you-go API key. RunAPI mirrors every Claude model at half the official rate for the API route.

Updated June 18, 2026 RunAPI Editorial
At a glance

How much does Claude Code cost?

Claude Code itself is free to install. What you pay for is model usage. You can use a subscription with fixed monthly limits, or an API key billed per token with no cap. If you keep hitting the limit on your current plan, that's the right signal to upgrade — not the model name on the box.

Free tier

Limited Claude Code usage at no cost. Enough to try the tool, not enough for daily work.

Pro ($20/mo)

The $20 plan gives Sonnet access with modest daily limits. Fine for light, individual use — most people don't need more.

Max ($100/mo)

The $100 plan adds higher limits and Opus access. Note: Opus burns through your 5-hour block about 2x faster than Sonnet. The $200 plan gives 5x the usage of the $100 plan.

API via RunAPI

Pay per token with no cap. Sonnet 4.6 at $3/M input and $15/M output — 50% off official. No hitting limits mid-session.

Four ways to pay

Free vs Pro vs Max vs API — which Claude Code plan fits you?

The subscriptions trade a fixed monthly fee for usage caps. The API route has no cap and full model choice — you pay per token and scale freely. The table compares all four so you can match the plan to how much you actually code.

Plan Price Models & limits Best for
Free $0 Limited Sonnet, low daily cap Trying Claude Code
Pro $20/mo Sonnet, modest daily limits Light individual coding
Max $100/mo ($200 for 5x) Sonnet + Opus, high limits Heavy daily users
API via RunAPI Pay-per-token All Claude models, no cap Teams, CI, multi-model setups

Subscriptions cap usage by session over a 5-hour block window. On the $100 plan, Opus burns through a block roughly 2x faster than Sonnet — if you want the full session, stick to Sonnet. The API has no block limit — you pay for the tokens you use.

Cost by usage level

What does Claude Code cost at different usage levels?

The cheapest route depends on how much you code. The table estimates the monthly API cost through RunAPI at four usage levels and shows when a subscription becomes the better deal.

Usage level Approx output tokens/mo API cost via RunAPI (Sonnet 4.6) Cheaper route
Occasional ~1M ~$15/mo API or Pro
Daily light ~3M ~$45/mo API
Daily heavy ~6.7M ~$100/mo Break-even with Max
Power user ~15M+ ~$225/mo+ Max ($100 or $200)

Estimates use Sonnet 4.6 at $15/M output through RunAPI. Input tokens and cache discounts lower the real total. The break-even with Max ($100/mo) lands around 6.7M output tokens per month.

The API route

How does the RunAPI route cut your Claude Code bill in half?

Instead of a fixed subscription, you point Claude Code at the RunAPI endpoint and pay per token at 50% of Anthropic's published rates. No monthly cap, no hitting limits mid-session, and every Claude model is available.

50% off every model

Sonnet 4.6 at $3/M input and $15/M output. Opus 4.7 at $5/M input and $25/M output. Haiku 4.5 at $1/M input and $5/M output. All half the official rate.

No usage cap

Unlike Pro and Max, the API does not cut you off after a 5-hour block. You pay for what you use and keep working through long sessions without watching the clock.

Cache discounts apply

Claude Code reuses the same system prompt and file context on every request. Cache reads cost 90% less, so real-world bills run below the headline per-token rate.

Control output length

Set CLAUDE_CODE_MAX_OUTPUT_TOKENS to cap tokens per response. Lower caps cut cost on verbose tasks; raise it when you need long edits in one pass.

Getting started

How to use a RunAPI key in Claude Code

1

Create a RunAPI account

Sign up at runapi.ai and create an API key from Dashboard → API Keys. No credit card required for the free tier.

2

Set the base URL

Export ANTHROPIC_BASE_URL=https://api.runapi.ai so Claude Code routes requests through RunAPI instead of the default endpoint.

3

Set your API key

Export ANTHROPIC_API_KEY with your RunAPI key. Claude Code uses these two variables on startup — no other config change is needed.

4

Run Claude Code

Launch claude in your project. Pick claude-sonnet-4-6 or claude-opus-4-7 and code at 50% of the official rate, with usage visible in the RunAPI dashboard.

Frequently asked questions

Claude Code Pricing FAQ

Is Claude Code free to use?

Claude Code is free to install and there is a free usage tier with a low daily cap. To do real daily work you need either a Pro or Max subscription, or an API key. The API route through RunAPI is pay-as-you-go at 50% off.

Is it worth paying $200 instead of $20 for Claude Max?

It depends on the route. The $20 plan (Pro) works for light individual use. The $100 plan (Max) suits daily heavy users. The $200 plan gives 5x the usage of Max. The API route has no fixed fee — at light use it runs around $45/month through RunAPI.

I feel like I code everything I need with the $20 plan. Is that normal?

Most people do fine with the $20 plan at the start. The right trigger to upgrade is hitting the usage limit repeatedly — not because you want Opus. Start at $20, hit limits consistently, move to $100. Don't jump straight to $200.

How quickly do you hit rate limits on the $100 vs. $200 plan?

Yes, but watch out. On the $100 plan, Opus burns through your 5-hour block in about 2 hours because it costs more tokens per task. If you want the full 5-hour session, stick to Sonnet-only mode. Opus is worth switching to only when Sonnet loops on the same error 3 or more times.

Is the API cheaper than Claude Max?

For most individual developers, yes. The break-even on Sonnet 4.6 through RunAPI is around 6.7M output tokens per month, the point where API cost reaches the $100 Max fee. Below that the API is cheaper; above it, Max wins on a flat fee.

What is claude code api cost based on?

The API cost is per token. You pay for input and output tokens at the model's rate. Through RunAPI, Sonnet 4.6 is $3/M input and $15/M output — half the official Anthropic rate. Cache reads cut the input cost by a further 90%.

Can I use my own API key in Claude Code?

Yes. Set ANTHROPIC_BASE_URL to https://api.runapi.ai and ANTHROPIC_API_KEY to your RunAPI key. Claude Code reads both on startup and routes every request through RunAPI without any other change. Persist the two exports in your shell profile so they survive new sessions.

What does CLAUDE_CODE_MAX_OUTPUT_TOKENS do?

It caps how many tokens Claude Code can return in a single response. Lowering it reduces cost on verbose tasks and prevents runaway token spend. Raise it when you need long edits or large file rewrites completed in one pass. Set it as an environment variable before launching.

RELATED

Explore More

Run Claude Code at half price.

Create a free RunAPI account, set two environment variables, and code in Claude Code with Sonnet, Opus, or Haiku at 50% off official Anthropic pricing. No subscription required — pay only for what you use.