Back to guides
Pricing·September 11, 2026·Updated October 3, 2026·10 min read

Claude Code pricing in 2026: subscription or API, how much a month costs, and which pays off

Claude Code is paid for with either a fixed fee or a per-token bill, and almost all confusion about its price comes from mixing the two. Here are the figures for both routes, what a real month costs, and the calculation for choosing one.

Claude Code is free to install, but not to use, and its price depends on how you pay. With a claude.ai subscription, it’s included in the fee: Claude Pro costs $20 per month ($17 per month with annual billing) and Claude Max starts at $100 per month, as of September 2026; the Free plan doesn’t include Claude Code. With an API key, there’s no subscription fee and you pay per token: at Kunavo, Claude Sonnet 5 costs $1.40 per million input tokens and $7.00 per million output tokens, so a typical agent interaction (about 25,000 input tokens and 1,200 output tokens) costs around $0.0434. Anthropic’s own documentation puts actual spending at about $13 per developer per active day. All figures are in US dollars (USD).

Nearly all confusion about how much Claude Code costs comes from mixing up these two options. This page gives the current figures for both, the calculation to help you choose, the cost of a real month of use, and how to point Claude Code to a cheaper API without reinstalling anything.

Rates verified on October 3, 2026 against claude.com/pricing (plans, as of September 2026) and Anthropic’s API pricing documentation. Kunavo rates are read from the site’s model catalog.

Claude Code pricing: the two ways to pay

Subscription (Pro / Max)API key (pay as you go)
What you payFixed fee, starting at $20 per monthPer token, no subscription fee
LimitsRolling 5-hour window and weekly cap, shared with Claude chatNo windows; you set the spending cap per key
A quiet monthCharged in full$0 if you don’t use it
A busy monthYou hit the limit and waitScales with the work, and so does the bill
Spending controlUsage bars in /usageUsage by token and key
Best forPredictable daily use by one personIrregular use, teams that split costs, CI, and automation

The two options don’t combine. While a credential variable is set, Claude Code uses the key and sets the subscription aside: plan limits no longer apply, and usage is billed to the key. The /status command shows which one is active.

Claude Code pricing with a subscription

Claude Code requires a Pro, Max, Team, Enterprise, or Console (API) account; according to Anthropic’s installation documentation, the Claude.ai Free plan doesn’t include Claude Code. Prices published at claude.com/pricing, as of September 2026:

PlanPriceWhat you get
Pro$20 per month, or $17 per month with annual billing ($200 upfront)Claude Code included, subject to Pro usage limits
MaxStarting at $100 per monthTwo tiers, with 5 or 20 times the Pro usage, for users who hit Pro limits
TeamStandard seat: $25 per month ($20 with annual billing); Premium seat: $125 per month ($100 with annual billing)Per-seat allowance shared with chat, plus spending reports for administrators
EnterpriseCustomPer-seat allowances, usage credits, and an analytics API per user

The biggest factor isn’t the fee but the limit. Plan usage is measured in a rolling five-hour window and a weekly window, both shared with Claude chat: an afternoon of web conversations uses the same allowance as your coding session. Switching models with /model doesn’t reset the window, because the windows apply across all models. Claude pricing explains what each plan includes beyond coding, and when the API is worthwhile for chat.

Is Claude Code free?

The tool is free; using it isn’t. The CLI, VS Code and JetBrains extensions, and all configuration are free: what you pay for is the model calls. There’s no free tier that lets Claude Code use a model without paying: the Claude.ai Free plan doesn’t include it, and the API charges per token from the first call.

The lowest-commitment option is a pay-as-you-go key: no monthly fee, a $10 minimum top-up, and a balance that never expires, so a month without coding costs $0. With that $10 and Sonnet 5, you get about 230 agentic steps, or around 12 tasks of 20 steps. Read the longer version in English: is Claude Code free.

Claude Code API pricing by model

With a key, there’s no plan or usage window: Claude Code is billed as standard Claude API traffic. Files and tool output count as input tokens; edits, explanations, and reasoning count as output tokens. Rates per million tokens (input / output):

ModelAnthropic official rateKunavoSavingsOne agentic stepIn Claude Code, for…
claude-haiku-4-5$1.00 / $5.00$0.70 / $3.50~30 %$0.0217Background calls, summaries, and simple subagents
claude-sonnet-4-6$3.00 / $15.00$2.10 / $10.50~30 %$0.0651Everyday coding on the tightest budget
claude-sonnet-5$2.00 / $10.00$1.40 / $7.00~30 %$0.0434The everyday workhorse model
claude-opus-5$5.00 / $25.00$3.50 / $17.50~30 %$0.1085Planning and multi-file architecture changes
claude-fable-5$10.00 / $50.00$7.00 / $35.00~30 %$0.217The most demanding work and longest tasks

On Kunavo, claude-opus-5 costs $3.50 / $17.50, which is 30% below its official rate ($5.00 / $25.00). If budget is the priority, Sonnet 5 handles the same step for $0.0434.

Caching is part of the price, too

Claude Code resends the entire conversation at each step, so most of what it bills for is repeated context — exactly what prompt caching makes cheaper. Multipliers on the input rate:

Token typeMultiplierSonnet 5 on Kunavo, per million
Cache read (a hit)0.1×$0.14
Cache write1.25×$1.75
Uncached input1×$1.40

In a session with a warm cache, most input tokens are cache reads billed at one-tenth the rate; that’s why multiplying token counts by the price greatly overestimates the bill. It also explains the worst spending pattern in Claude Code: returning after a long break, once the cache has expired, means processing the entire context again at full price.

How much a month of Claude Code costs

Spending follows agentic steps, not days. A step is one round trip to the model within a task: about 25,000 input tokens (system prompt, conversation, and files) and 1,200 output tokens. At Kunavo rates, without caching:

ModelOne stepOne 20-step taskOne busy day (5 tasks)20 busy days
claude-haiku-4-5$0.0217$0.434$2.17$43
claude-sonnet-4-6$0.0651$1.30$6.51$130
claude-sonnet-5$0.0434$0.868$4.34$87
claude-opus-5$0.1085$2.17$10.85$217
claude-fable-5$0.217$4.34$21.70$434

Twenty days like this with Sonnet 5 add up to about $87. At Anthropic’s official rate, Opus 5 would cost about $310; at Kunavo, $217. These figures are deliberately pessimistic: they assume no caching and one model for everything.

For comparison with real deployments, Anthropic’s Claude Code spending documentation estimates about $13 per developer per active day and $150 to $250 per developer per month for enterprise deployments, with 90% of users below $30 per day. These are figures at official rates using a mix of models, and they’re a useful benchmark for budgeting a team.

The break-even point

With both options on the same scale, at $0.0434 per step with Sonnet 5:

  • $20 (Pro) equals about 460 agentic steps per month, or around 23 20-step tasks.
  • $100 (Max, entry tier) equals about 2,300 steps, or around 115 tasks.

The resulting rule of thumb: if you use Claude Code to code almost every day, a subscription is usually cheaper. At Anthropic’s measured average pace, a month of work easily exceeds Max’s $100, and the plan covers it as long as you don’t hit its limits. If your usage is irregular — intense weeks followed by weeks without using it — pay-as-you-go wins, because quiet weeks cost nothing. Teams often prefer keys anyway: they can split costs by person and set a monthly cap per key. To calculate your own costs, use the token pricing calculator (in English).

Calculate a session using your own numbers

Claude Code’s /usage command shows the session’s four token counts. This is the reliable figure for estimating spend because it separates cache reads from new input:

gasto_claude_code.py
# Cuánto costó una sesión de Claude Code, a partir de sus propios tokens.
# Ejecuta /usage dentro de Claude Code para obtener los cuatro números.
TARIFAS = {  # USD por millón de tokens en Kunavo: (entrada, salida)
    "claude-haiku-4-5":  (0.70, 3.50),
    "claude-sonnet-4-6": (2.10, 10.50),
    "claude-sonnet-5":   (1.40, 7.00),
    "claude-opus-5":     (3.50, 17.50),
}

def gasto_sesion(modelo, entrada, salida, lectura_cache=0, escritura_cache=0):
    e, s = TARIFAS[modelo]
    return (
        entrada / 1e6 * e                   # entrada nueva
        + salida / 1e6 * s                  # salida, razonamiento incluido
        + lectura_cache / 1e6 * e * 0.10    # lectura de caché: 10 % de la entrada
        + escritura_cache / 1e6 * e * 1.25  # escritura en caché: 125 %
    )

# La sesión de ejemplo que muestra la documentación de Anthropic para /usage:
print(gasto_sesion("claude-sonnet-5", 1_200, 5_300, 940_000, 50_000))  # ≈ 0.26

In this example session, 940,000 tokens were read from cache, compared with 1,200 new input tokens. At the full rate, those 940,000 tokens would cost $1.32; as cache reads, they cost $0.1316. That’s why caching, more than model choice, is the biggest cost lever in Claude Code.

Four ways to lower your bill

  1. Let caching work. Cache reads cost 10% of the rate, and Claude Code rereads the conversation at each step: this has the biggest impact (how it works).
  2. Clear the context between unrelated tasks. The context is resent at every step, so an all-day session gets more expensive with each message; start a new task with /clear to keep the context small.
  3. Choose a model for each task. Leaving the largest model as the default is the most common cause of an unexpected bill: one step with Fable 5 costs 5.0 times as much as one with Sonnet 5. Sonnet handles most coding; save Opus and Fable for architecture and difficult reasoning.
  4. Do not remove the Haiku line. Without ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5, Claude Code's haiku alias requests an ID that Kunavo does not offer (Haiku 5.5 from v2.1.293 onward), so /model haiku and subagents configured with haiku return 404s. The same line routes calls Claude Code makes on its own for summaries and titles away from the main model.

Using Claude Code with Kunavo

Claude Code natively reads ANTHROPIC_BASE_URL, so it works with any endpoint serving Anthropic’s Messages API: no plugin, no proxy, and no installation changes. For a terminal session:

~/.zshrc
export ANTHROPIC_BASE_URL=https://api.kunavo.com   # el origen, sin /v1
export ANTHROPIC_AUTH_TOKEN=sk-kn-...
export ANTHROPIC_MODEL=claude-sonnet-5
export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5

ANTHROPIC_BASE_URL is only the origin: Claude Code adds /v1/messages on its own, and a value that already ends in /v1 results in a 404. Use ANTHROPIC_AUTH_TOKEN rather than ANTHROPIC_API_KEY: the two variables send the key in different headers, and Kunavo authenticates with Authorization: Bearer, which is the one sent by ANTHROPIC_AUTH_TOKEN. The model lines are not optional: Claude Code's default model and its opus and sonnet aliases track Anthropic's latest models, and if Kunavo does not yet offer one, the first request returns a 404. The sonnet alias requests Sonnet 5.5, which Kunavo does not offer: without ANTHROPIC_DEFAULT_SONNET_MODEL, /model sonnet, the execution phase of opusplan, and any subagent with model: sonnet end in a 404. The opus alias is fixed to Opus 5.5 (claude-opus-5-5), which requires Claude Code v2.1.280 or later; if your version is older, run claude update. To make the configuration persist, put the variables in the env block of your user configuration:

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.kunavo.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-kn-...",
    "ANTHROPIC_MODEL": "claude-sonnet-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5"
  }
}

Never put them in the project’s .claude/settings.json, which is committed to the repository. In the VS Code extension, put the variables in claudeCode.environmentVariables, in VS Code’s user settings. To check, open the status tab with /status: an “Auth token” line confirms the credential is active; if “Login method” shows a claude.ai account, the variable hasn’t loaded. The complete guide is in Claude Code with Kunavo (in English).

The sk-kn- key is created in the key dashboard after signing up and topping up $10. The balance is topped up with Stripe — cards (Visa, Mastercard, American Express, JCB, UnionPay), Apple Pay, Google Pay, and Link, among other methods depending on your country; SEPA direct debit is not offered — does not expire, and failed requests are not charged. Each key supports a monthly spending limit (when reached, the API returns a 402) and an allowlisted IP address list: useful for giving each developer or CI its own key without surprises at the end of the month.

What changes, and what doesn’t, when using Claude Code with an API

Claude Code’s core — the agent, tools, subagents, and MCP servers — runs on the Messages API and is unchanged. What does change: with an active gateway credential, Remote Control and voice dictation are unavailable because they require a claude.ai identity.

And what Kunavo doesn’t replace: it serves Claude using shared capacity, without dedicated quota or a contractual SLA. If your team needs guaranteed quota or a service-level agreement, contract directly with Anthropic. And if you use Claude Code daily and stay within the plan limits, a subscription will probably be cheaper; the API makes sense for irregular use, teams that want to split and cap spending, and automation.

Frequently asked questions

How much does Claude Code cost?

It has two different prices, depending on how you pay. With a claude.ai subscription, Claude Code is included in the fee: Claude Pro costs $20 per month ($17 per month with annual payment, $200 upfront), and Claude Max starts at $100 per month, as of September 2026 according to claude.com/pricing. With an API key, you pay per token with no subscription fee: Anthropic sets Claude Sonnet 5 at $2.00 input / $10.00 output per million tokens and Claude Opus 5 at $5.00 / $25.00; on Kunavo, they cost $1.40 / $7.00 and $3.50 / $17.50. According to Anthropic's own documentation, actual spending is around $13 per developer per day of use and between $150 and $250 per developer per month.

Is Claude Code free?

Installing it is; using it isn’t. The CLI, VS Code and JetBrains extensions, and all configuration are free, but model calls are paid, and there’s no free tier that lets Claude Code use a model without paying: Anthropic’s installation documentation says the Claude.ai Free plan doesn’t include Claude Code. The lowest-commitment option is a pay-as-you-go key with no monthly fee; at Kunavo, the minimum top-up is $10 and the balance never expires.

Which is cheaper for Claude Code, a subscription or the API?

It depends on how many agentic steps you run, not how many days you work. One step is about 25,000 input tokens and 1,200 output tokens, which costs about $0.0434 with Claude Sonnet 5. Pro's $20 therefore equals about 460 steps per month, around 23 20-step tasks, and Max's $100 equals about 2,300 steps. If you code with Claude Code almost daily, the subscription is usually cheaper as long as you do not hit its limits; if your usage is irregular, pay-as-you-go wins, because a month without coding costs $0.

What is Claude Code’s API pricing?

Through the API, Claude Code is billed like any other Claude API traffic: files and tool output count as input tokens, while edits, explanations, and reasoning count as output tokens. On Kunavo, per million input / output tokens: Claude Haiku 4.5, $0.70 / $3.50; Claude Sonnet 4.6, $2.10 / $10.50; Claude Sonnet 5, $1.40 / $7.00; Claude Opus 5, $3.50 / $17.50, and Claude Fable 5, $7.00 / $35.00. A typical agentic step costs about $0.0217 with Haiku 4.5, $0.0434 with Sonnet 5, and $0.217 with Fable 5.

Does a Claude Pro subscription include the API?

No. A claude.ai subscription and Claude API keys are separate products with separate billing, and they don’t combine. While a credential variable such as ANTHROPIC_AUTH_TOKEN is set, Claude Code uses the key instead of your claude.ai session: plan limits no longer apply, and usage is billed to the key owner. Remove the variable, and Claude Code switches back to the subscription.

How much does a developer spend per month using Claude Code?

Anthropic’s Claude Code spending documentation estimates about $13 per developer per active day and $150 to $250 per developer per month for enterprise deployments, with 90% of users below $30 per day. These are figures at official rates using a mix of models. At Kunavo, the same volume costs between 30% and 30% less, depending on the model. Routing background calls to Claude Haiku 4.5 ($0.70 / $3.50 per million) cuts costs further.

How can I reduce Claude Code costs?

Four levers, in order of impact: let prompt caching work (cached input is charged at 10% of the rate, and Claude Code rereads the entire conversation at every step); clear the context between unrelated tasks instead of keeping an all-day session; choose the model based on the task instead of leaving the largest as the default; and keep ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5 in a gateway setup: Kunavo requires it, because without it the haiku alias requests an ID that Kunavo does not offer and /model haiku and subagents configured with haiku return 404s. It also routes Claude Code's internal calls away from the main model. Pointing ANTHROPIC_BASE_URL to a cheaper endpoint adds to these four.

What stops working if I use Claude Code with a different API?

With an active gateway credential, Remote Control and voice dictation aren’t available because they require a claude.ai identity. The core of Claude Code — the agent, tools, subagents, and MCP servers — runs on the Messages API and is unchanged. A gateway like Kunavo also uses shared capacity, without dedicated quota or a contractual SLA: if you need either, contract directly with Anthropic.