Claude Code has two completely separate prices, and nearly all confusion about its cost comes from mixing them up. A claude.ai subscription includes the tool in a fixed monthly fee with usage limits. An API key charges per token, with no monthly fee or usage limit. This page gives the current figures for both options, the calculation to help you choose, the cost of a real month of use, and — the part often missing from English-language coverage — how to pay from Brazil.
Rates verified on October 3, 2026 against claude.com/pricing and Anthropic’s API pricing documentation. Kunavo’s per-token prices are read live from the model catalog.
The two options, side by side
| Subscription (Pro / Max) | API key (pay as you go) | |
|---|---|---|
| What you pay | Fixed monthly fee, starting at $20 | Per token, no subscription fee |
| Limits | Rolling 5-hour and weekly usage windows, shared with Claude chat | None — you pay for what you use |
| A quiet month | Charged in full | Costs nothing |
| A busy month | Limited — you hit the cap and wait | Scales with the work, and so does the bill |
| Paying from Brazil | Card (credit or debit) on the website, or the app store | Pix, international card, Apple Pay, Google Pay |
Subscription pricing
Claude Code is included in claude.ai paid plans — Anthropic’s installation documentation says the Free plan doesn’t include access to Claude Code. Pro costs $20/month ($17/month with annual billing, $200 upfront) and suits one developer working within the plan limits. Max starts at $100/month and is for people who keep hitting those limits. Team and Enterprise add per-seat allowances and administrative spending controls.
Two details matter in Brazil: billing is in dollars and recurring, on an international credit card enabled for foreign transactions — with IOF and the issuer’s international transaction fee charged every month — and usage limits are shared with Claude chat, so an afternoon of conversation uses the same window as your coding session.
API pricing
There’s no monthly fee here: you pay per token. Rates in USD per 1M tokens, with Anthropic’s official table alongside for direct comparison.
| Model | Kunavo input / output | Anthropic list (in / out) | Savings | Cost per step |
|---|---|---|---|---|
claude-haiku-4-5 | $0.70 / $3.50 | $1.00 / $5.00 | ~30% | $0.0217 |
claude-sonnet-4-6 | $2.10 / $10.50 | $3.00 / $15.00 | ~30% | $0.065 |
claude-sonnet-5 | $1.40 / $7.00 | $2.00 / $10.00 | ~30% | $0.043 |
claude-opus-5 | $3.50 / $17.50 | $5.00 / $25.00 | ~30% | $0.109 |
“Cost per step” means one round trip to the model within a task — system prompt, history, and file context in the input (~25,000 tokens), with an edit or explanation in the output (~1,200). It’s the right unit for thinking about Claude Code because the tool rereads the context at every step.
How much a real month costs
Anthropic’s cost documentation reports about $13 per developer per active day and $150–250 per developer per month for enterprise deployments, with 90% of users below $30 per active day. These are figures at full list price using a mix of models. At Kunavo rates, the reduction in cost for the same volume is 30% — and routing background calls to Claude Haiku 4.5 ($0.70 / $3.50 per 1M) cuts it further.
At Kunavo rates, the break-even point is: $20 buys approximately 460 agentic steps per month with Sonnet 5 — around 23 20-step tasks. Below that volume, pay-as-you-go wins because a quiet month costs nothing. Above it, the subscription is worthwhile — until you hit the plan limits and have to wait for the window to reset.
Paying from Brazil — Pix, no international card
This is usually the real obstacle, not the price. A subscription purchased on the website accepts only credit or debit cards (Anthropic help center, checked on October 1, 2026); in the mobile app, billing is handled by the App Store or Google Play. The Kunavo API-key route does not depend on a card: checkout is processed by Stripe, and Pix appears as a payment method for customers paying from Brazil, with the amount shown in reais and immediate settlement. International cards (Visa, Mastercard, American Express), Apple Pay, and Google Pay remain available for those who prefer them.
Per-token rates are set in USD: with Pix, Stripe shows the conversion to reais at the time of payment; with a card, conversion follows the issuer’s exchange rate (check the IOF and international transaction fee in your banking app) — step-by-step instructions for paying with Pix are in the guide to paying for the API with Pix. The wallet is prepaid — a $10 minimum top-up, no subscription, no automatic renewal, and a balance that never expires. Based on the calculation above, $10 via Pix covers about 12 20-step agentic tasks. The full Brazil context (São Paulo latency, LGPD, invoices) is in the Claude API in Brazil guide.
How to point Claude Code to Kunavo
Claude Code reads the endpoint and credentials from environment variables—six lines, with no proxy or plugin:
export ANTHROPIC_BASE_URL=https://api.kunavo.com
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-5The model lines are not optional: Claude Code's default model and the opus and sonnet aliases follow Anthropic's newest models. 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 subagents with model: sonnet return 404. The opus alias is fixed to Claude Opus 5.5 (claude-opus-5-5, $2.80 / $14.00 per 1M tokens on Kunavo), which requires Claude Code 2.1.280 or later—on an earlier version, run claude update. While ANTHROPIC_AUTH_TOKEN is set, Claude Code uses the key instead of the saved login: plan limits no longer apply, and usage is charged to the key balance. Remove the variable to return to the subscription; you can switch between the two routes by shell. Create the key in the dashboard; the complete walkthrough is in the Claude API key guide.
Calculating the cost of a real session
Run /usage inside Claude Code to see the session’s four numbers (new input, output, cache read, and cache write), then plug them into this function:
# Quanto custou uma sessão do Claude Code, a partir dos tokens dela.
# Rode /usage dentro do Claude Code para pegar os quatro números reais.
RATES = { # USD por 1M de tokens na Kunavo: (input, output, leitura de cache / input)
"claude-haiku-4-5": (0.70, 3.50, 0.1),
"claude-sonnet-4-6": (2.10, 10.50, 0.1),
"claude-sonnet-5": (1.40, 7.00, 0.1),
"claude-opus-5": (3.50, 17.50, 0.1),
"claude-opus-5-5": (2.80, 14.00, 0.05),
}
def custo_sessao(model, inp, out, cache_read=0, cache_write=0):
i, o, r = RATES[model]
return (
inp / 1e6 * i # input novo
+ out / 1e6 * o # output, incluindo tokens de raciocínio
+ cache_read / 1e6 * i * r # leitura de cache: fração r da tarifa de input
+ cache_write / 1e6 * i * 1.25 # escrita de cache de 5 min: 125%
)
print(custo_sessao("claude-sonnet-5", 1_200, 5_300, 940_000, 50_000))Notice the weight of cache reads: in a long session they dominate the token count, and they are precisely what costs only 10% of the input rate on Sonnet 5 (5% on Opus 5.5). That is why prompt caching, rather than model choice, is the single biggest cost lever in Claude Code.
How to lower your bill
- Let caching do its work.Cached input costs 10% of the rate on Sonnet 5 (5% on Opus 5.5), and Claude Code rereads the entire conversation at every step (how it works).
- Clear the context between unrelated tasks. An endless session resends the entire history at every step; shorter context costs less.
- Choose a model to fit the task. Leaving the largest model as the default is the most common and costly mistake.
- Route internal calls to Haiku with
ANTHROPIC_DEFAULT_HAIKU_MODEL— they’re frequent and simple.
Haven’t installed it yet? The walkthrough is in how to install Claude Code. If you’re comparing it with OpenAI’s agent, the same calculation for Codex is in how much Codex costs.
Frequently asked questions
How much does Claude Code cost?
There are two separate prices, depending on how you pay. With a claude.ai subscription, Claude Code is included in the monthly fee: Pro costs $20/month ($17/month with annual billing, $200 upfront), and Max starts at $100/month. With an API key, you pay per token with no monthly fee—as of October 3, 2026, Anthropic lists Claude Sonnet 5 at $2.00 input / $10.00 output per 1M tokens and Claude Opus 5 at $5.00 / $25.00, and Anthropic's own documentation estimates real-world usage at around $13 per developer per active day and $150–250 per developer per month. Through Kunavo, the same models cost $1.40 / $7.00 and $3.50 / $17.50. Model rates are on the pricing page.
How can I pay for Claude Code in Brazil? Does it accept Pix?
A subscription purchased on the claude.ai website accepts only credit or debit cards, with monthly renewal; through the mobile app, billing is handled by the App Store or Google Play. Pix is not accepted for subscriptions. The API key option through Kunavo accepts Pix: checkout is processed by Stripe, the amount is displayed in Brazilian reais, and payment clears immediately, without requiring an international card. International cards (Visa, Mastercard, American Express), Apple Pay, and Google Pay also work. It is a prepaid wallet with a minimum top-up of $10 and a balance that never expires, so a month without coding incurs no charges. To get started, create an account and generate your key.
Is a subscription or an API key cheaper for Claude Code?
It depends on how many agentic steps you run, not how many days you work. A step has about 25,000 input tokens and 1,200 output tokens, costing $0.043 on Claude Sonnet 5 at Kunavo's rates. A $20 Pro subscription therefore equals approximately 460 steps per month—about 23 tasks of 20 steps. Below that, pay-as-you-go is cheaper and an inactive month costs nothing; above it, the monthly plan pays off until you hit the plan's usage limits.
Does a Claude Pro subscription include API access?
No. claude.ai subscriptions 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 login: plan limits no longer apply, and usage is billed to the key’s owner. Remove the variable, and Claude Code switches back to the subscription.
Is there a free way to run Claude Code?
The CLI, editor extensions, and all configuration are free. Model calls are not, and there’s no free tier that lets Claude Code call a model at no cost — 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.
How can I make Claude Code cheaper?
Four ways, in order of impact: let prompt caching work (cached input is billed at 10% of the input rate, and Claude Code rereads the entire conversation at each step), clear the context between unrelated tasks instead of keeping a long session, choose a model to fit the size of the task instead of leaving the largest one as the default, and route Claude Code’s internal calls to Haiku via ANTHROPIC_DEFAULT_HAIKU_MODEL. Pointing ANTHROPIC_BASE_URL to a cheaper endpoint is an additional option.
What about inside VS Code?
Kilo Code, Cline, and Roo Code use the same key and rates, with a three-field configuration — see the Kilo Code with the Claude API guide. For OpenAI’s terminal, see Codex CLI with an API key.