Back to Article List

What Claude Code costs: Plans, API billing and usage limits

What Claude Code costs: Plans, API billing and usage limits

The direct answer first, because most people land on this page with one question. Claude Code has no free tier. It's included in every paid Claude plan: Pro, Max (both the 5x and the 20x tier), Team and Enterprise. If you'd rather not subscribe, it runs pay-as-you-go against an API key from the Claude Console instead. Current numbers for all of that live on the Claude pricing page, and I'm deliberately not quoting any figure here: Anthropic adjusts prices and allowances often enough that anything I print would rot before the quarter ends.

The useful questions sit one level deeper: which billing shape fits how you work, and what the limits do once you hit them. Plus where the money quietly leaks, which is what this article spends most of its time on.

Is Claude Code free and which plans include it

Every paid consumer and business plan carries it. Pro is the entry point for individual daily use. Claude Code on the Max plan comes in two tiers, 5x and 20x, scaling up the usage allowance for people who run the agent hard. Team and Enterprise add the org layer (central billing and admin policy controls) on top. There's no separate "Claude Code plan" to buy. The CLI is a surface of your Claude subscription the same way claude.ai and the desktop app are, and all of them draw from one shared pool of usage. That sharing surprises people: a long claude.ai research session on Monday morning eats budget your coding session wanted on Monday afternoon.

The other route is an API key from the Claude Console. There's no subscription and no allowance to manage. You pay for the tokens you consume and the meter never stops you mid-task, which cuts both ways.

How the subscription limits work

Two limits run at once. The first is a rolling 5-hour window: your usage inside the current window counts against a session allowance, and as the window rolls forward, room opens up again. The second is a separate weekly limit that sits above it, with Opus-class usage tracked on its own meter in the UI. Hit the 5-hour ceiling and you wait (or switch to a smaller model) until the window rolls. Hit the weekly ceiling and the wait is longer.

In practice the 5-hour window catches bursty days, the weekly limit catches sustained heavy weeks. I hit the session ceiling maybe twice a month, almost always when I've had opus doing something sonnet could have handled. The exact allowances per plan shift too often to print, which is precisely why the in-CLI meters below matter more than any table you'll find in a blog post.

Subscription or API billing

My decision logic, compressed. Interactive daily work wants a subscription: the monthly cost is predictable and the worst case when you overdo it is a pause rather than a bill shock. Automation wants an API key: CI jobs and cron-driven agents need to run when scheduled, and a pipeline that stalls because your chat usage exhausted a shared window is a bad afternoon. Teams running scheduled agent jobs, say Claude Code on a VPS doing nightly maintenance, nearly always end up with a key for the automation and subscriptions for the humans.

Subscription holders can mint a long-lived token with claude setup-token for CI use. It works, but those runs still draw from the same shared limits, which is exactly what you don't want in a busy week. I treat it as a way to trial automation before giving it its own key and budget.

One expensive gotcha while we're here: if an ANTHROPIC_API_KEY variable is set in your shell, Claude Code can end up billing that key instead of your subscription, since an approved key outranks your login in the authentication precedence. If your Console bill grows while a perfectly good Max plan sits idle, run unset ANTHROPIC_API_KEY, restart the shell and check /status.

Bedrock, Vertex and Foundry

Enterprise readers get a third path. Claude Code runs against AWS Bedrock, Google Vertex and Microsoft Foundry, switched on with environment variables like CLAUDE_CODE_USE_BEDROCK, and billing then lands on the cloud contract you already have. Nothing changes in the terminal. This is mostly a procurement story: model usage rides existing cloud commitments and security review, no new vendor relationship required.

Watching usage from inside the CLI

Three slash commands cover it. /usage (alias /cost) shows what the current session has consumed. /context draws a map of what's filling the context window right now, which is where cost problems become visible before they become billing problems. /status shows how you're logged in and where you stand against limits, so it's also the fastest way to confirm which account is being billed at all. If you'd rather have the numbers on screen permanently instead of asking for them, a custom status line can render context and cost fields on every turn.

The habit worth building: glance at /context whenever a session starts feeling sluggish. A bloated context costs money on every single turn, because the whole thing is reprocessed each time the model responds.

How to cut Claude Code costs

Match the model to the task

This is the biggest lever by a wide margin. Model aliases in Claude Code map to very different price points, and /model switches between them mid-session (details in the model configuration docs). My split: haiku for mechanical work like renames, boilerplate, log spelunking and comment cleanup, sonnet as the daily driver for most coding, opus or fable only when the problem earns it. The opusplan alias is the sensible compromise, using Opus for the planning phase and Sonnet for execution, so you pay flagship rates for the thinking and standard rates for the typing.

Default model and context window size

Out of the box, sonnet resolves to the latest Sonnet on the Anthropic API and is what most sessions run on unless you say otherwise; /model shows what's active, and pressing Enter in its picker saves your choice as the new default while s switches for the current session only. On context, the current flagship models carry a 1M-token window while the smaller tiers sit at 200K, with sonnet[1m] and opus[1m] as explicit aliases for the large window. A bigger window is not a cost feature. Everything sitting in context gets reprocessed on every turn, so filling a giant window is the most reliable way to burn through an allowance, and the lean-context habits below matter more as the window grows.

Keep the context lean

Run /clear between unrelated tasks instead of letting one long session accumulate three projects' worth of history; there's more on this in my guide to Claude Code sessions. Keep CLAUDE.md short, because every line of it loads into every session you ever start, making it the most expensive file in your repo per word. And point the agent at file paths rather than pasting giant files into the prompt. It reads what it needs.

If you want usage-based billing spread across several providers, routing through a gateway is an option too; I've written up Claude Code with OpenRouter separately, trade-offs included.

The change that saves most people the most money is embarrassingly small: stop running opus on work sonnet handles fine. Watch /usage for a week and you'll see your own version of that pattern.

Your idea deserves better hosting

24/7 support 30-day money-back guarantee Cancel anytime
Abonament

VPS.S1

22.15 zł Save  17 %
18.45 Lunar
  • 2 vCPU AMD EPYC
  • 2 GB RAMMEMORIE
  • 30 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse

VPS.S3

55.20 zł Save  33 %
36.79 Lunar
  • 4 vCPU AMD EPYC
  • 6 GB RAMMEMORIE
  • 70 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse

EPYC VPS.P1

33.10 zł Save  22 %
25.74 Lunar
  • 2 vCPU AMD EPYC
  • 4 GB RAMMEMORIE
  • 40 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

EPYC VPS.P2

62.56 zł Save  24 %
47.83 Lunar
  • 2 vCPU AMD EPYC
  • 8 GB RAMMEMORIE
  • 80 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

EPYC VPS.P4

110.43 zł Save  23 %
84.65 Lunar
  • 4 vCPU AMD EPYC
  • 16 GB RAMMEMORIE
  • 160 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

EPYC VPS.P5

147.25 zł Save  25 %
110.43 Lunar
  • 8 vCPU AMD EPYC
  • 16 GB RAMMEMORIE
  • 180 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

EPYC VPS.P6

220.90 zł Save  25 %
165.66 Lunar
  • 8 vCPU AMD EPYC
  • 32 GB RAMMEMORIE
  • 200 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

EPYC VPS.P7

257.72 zł Save  29 %
184.07 Lunar
  • 16 vCPU AMD EPYC
  • 32 GB RAMMEMORIE
  • 240 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

Genoa VPS.G2

92.40 zł Save  20 %
73.91 Lunar
  • 2 vCPUAMD EPYC Genoa generația a 4-a 9xx4 cu 3,25 GHz sau similar, pe arhitectura Zen 4. AMD EPYC G4
  • 4 GB DDR5MEMORIE
  • 50 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

Genoa VPS.G4

166.34 zł Save  22 %
129.37 Lunar
  • 4 vCPUProcesor AMD EPYC cu nuclee vCPU dedicate, pe hardware de server pentru companii. AMD EPYC G4
  • 8 GB DDR5MEMORIE
  • 100 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

Genoa VPS.G6

332.72 zł Save  22 %
258.77 Lunar
  • 8 vCPUProcesor AMD EPYC cu nuclee vCPU dedicate, pe hardware de server pentru companii. AMD EPYC G4
  • 16 GB DDR5MEMORIE
  • 200 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

Genoa VPS.G7

591.53 zł Save  22 %
462.12 Lunar
  • 8 vCPUProcesor AMD EPYC cu nuclee vCPU dedicate, pe hardware de server pentru companii. AMD EPYC G4
  • 32 GB DDR5MEMORIE
  • 250 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

AMD Ryzen VPS.R1

62.82 zł Save  18 %
51.73 Lunar
  • 1 CPU dedicat AMD Ryzen 9 7950X cu 4,5 GHz sau similar, pe arhitectura Zen 4. vCPU
  • 4 GB DDR5MEMORIE
  • 50 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6 incluse Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos.
  • Backup automat inclus

AMD Ryzen VPS.R2

110.88 zł Save  17 %
92.40 Lunar
  • 2 CPU dedicate AMD Ryzen 9 7950X cu 4,5 GHz sau similar, pe arhitectura Zen 4. vCPU
  • 8 GB DDR5MEMORIE
  • 100 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6 incluse Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos.
  • Backup automat inclus

AMD Ryzen VPS.R4

406.66 zł Save  18 %
332.72 Lunar
  • 8 CPU dedicate AMD Ryzen 9 7950X cu 4,5 GHz sau similar, pe arhitectura Zen 4. vCPU
  • 32 GB DDR5MEMORIE
  • 400 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6 incluse Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos.
  • Backup automat inclus

Frequent questions

Can I use a subscription and an API key at the same time?

Yes, and plenty of people do: subscription for interactive work, key for automation. Just keep the key out of your interactive shell's environment, because once approved it takes precedence over your login and quietly moves your daily usage onto per-token billing. Scope the key to CI secrets or a dedicated automation user instead.