# Preços do Claude Code em 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*

## Quanto custa o Claude Code?

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&#39;s the right signal to upgrade — not the model name on the box.

- **Nível gratuito**: Uso limitado do Claude Code sem custo. Suficiente para experimentar a ferramenta, não suficiente para trabalho diário.
- **Pro ($20/mês)**: The $20 plan gives Sonnet access with modest daily limits. Fine for light, individual use — most people don&#39;t need more.
- **Max ($100/mês)**: 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.

## Gratuito vs Pro vs Max vs API — qual plano Claude Code se encaixa em você?

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.

| Plano | Preço | Modelos e limites | Melhor para |
|---|---|---|---|
| Gratuito | $0 | Sonnet limitado, baixo limite diário | Experimentar o Claude Code |
| Pro | $20/mês | Sonnet, limites diários modestos | Codagem individual leve |
| Max | $100/mês ($200 para 5x) | Sonnet + Opus, limites altos | Usuários diários intensos |
| API via RunAPI | Pagamento por token | Todos os modelos Claude, sem limite | Equipes, CI, configurações multi-modelo |

## Quanto custa o Claude Code em diferentes níveis de uso?

A opção mais barata depende de quanto você codifica. A tabela estima o custo mensal da API pela RunAPI em quatro níveis de uso e mostra quando uma assinatura se torna a melhor oferta.

| Nível de uso | Tokens de saída aproximados/mês | Custo da API via RunAPI (Sonnet 4.6) | Opção mais barata |
|---|---|---|---|
| Ocasional | ~1M | ~$15/mês | API ou Pro |
| Diário leve | ~3M | ~$45/mês | API |
| Diário intenso | ~6,7M | ~$100/mês | Ponto de equilíbrio com Max |
| Power user | ~15M+ | ~$225/mês+ | Max ($100 ou $200) |

## Como a opção RunAPI reduz sua conta do Claude Code pela metade?

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

### 50% de desconto em cada modelo

Sonnet 4.6 a $3/M de entrada e $15/M de saída. Opus 4.7 a $5/M de entrada e $25/M de saída. Haiku 4.5 a $1/M de entrada e $5/M de saída. Tudo pela metade da taxa oficial.

### Sem limite de uso

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.

### Descontos de cache se aplicam

O Claude Code reutiliza o mesmo prompt do sistema e contexto de arquivo em cada solicitação. As leituras de cache custam 90% menos, então as contas do mundo real ficam abaixo da taxa por token anunciada.

### Controle o comprimento de saída

Defina CLAUDE_CODE_MAX_OUTPUT_TOKENS para limitar tokens por resposta. Limites menores reduzem custos em tarefas prolixas; aumente-o quando precisar de edições longas em uma passagem.


## Como configurar uma chave de API no Claude Code pela RunAPI

1. **Criar uma conta RunAPI** — Cadastre-se em runapi.ai e crie uma chave de API no Painel → Chaves de API. Nenhum cartão de crédito é necessário para o nível gratuito.
2. **Definir a URL base** — Exporte ANTHROPIC_BASE_URL=https://runapi.ai para que o Claude Code roteie solicitações pela RunAPI em vez do endpoint padrão.
3. **Definir sua chave de API** — Exporte ANTHROPIC_API_KEY com sua chave RunAPI. O Claude Code usa essas duas variáveis na inicialização — nenhuma outra alteração de configuração é necessária.
4. **Executar o Claude Code** — Inicie o claude no seu projeto. Escolha claude-sonnet-4-6 ou claude-opus-4-7 e codifique com 50% da taxa oficial, com o uso visível no painel RunAPI.

## FAQ sobre Preços do Claude Code

### O Claude Code é gratuito?

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&#39;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&#39;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://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.

