The cheapest way to use Claude Code: a plan or an API key?
What Claude Code costs on a Claude plan and on an API key, Anthropic's published cost per developer, and which route is cheaper for light and heavy use.
Claude Code runs in two ways: on a Claude plan with a fixed monthly price and usage limits, or on an API key that charges per token. For light use, an API key is usually the cheapest route. For hours of coding every day, a fixed plan usually costs less than the same tokens at the official API price.
What are the ways to pay for Claude Code?#
Claude Code is Anthropic's coding agent for the terminal. It has two sign-in modes: you log in with a Claude plan account, or you give it an API key and pay for every request. Including 5abeer, that makes four routes:
| Route | How you pay | What limits your use | Who it suits |
|---|---|---|---|
| An official Claude plan | A fixed monthly price | The plan's usage limits | Daily users who can pay Anthropic by card |
| An official Anthropic API key | Per token, at the official price | Your Console balance | Teams that need a direct contract with Anthropic |
| A 5abeer API key | Per token, below the official price | Your balance, and a spend limit if you set one | Light or irregular use, automation, several projects |
| A 5abeer plan | A fixed monthly price, below the official price | A 5-hour limit and a weekly limit | Daily users of Claude Code and the other official apps |
How much does Claude Code cost on a plan?#
Claude Code is included in Anthropic's Pro, Max and Ultra plans. Your Claude Code usage shares the plan's limits with the Claude apps:
| Service | Item | Value | Note | Source |
|---|---|---|---|---|
| Claude | Pro, billed monthly | $20 a month | Includes Claude Code. | claude.com |
| Claude | Pro, billed yearly up front | $200 a year | Includes Claude Code. | claude.com |
| Claude | Max | $100 a month | 5x Pro usage every 5 hours and every week; includes Claude Code. | claude.com |
| Claude | Ultra | $200 a month | 10x Pro usage every week, no 5-hour limit for verified accounts; includes Claude Code. | claude.com |
| Anthropic | API usage with a paid plan | Billed separately from the plan | Max and Ultra include monthly API credits. | support.claude.com |
On an official plan, once you reach the limit you wait for it to reset or buy usage credits from Anthropic to keep going. These are Anthropic's own figures for Claude Code:
| Service | Item | Value | Note | Source |
|---|---|---|---|---|
| Anthropic | Average cost per developer per active day | $13 a day | An approximate average across enterprise deployments. | code.claude.com |
| Anthropic | Average cost per developer per month | $150–250 | An approximate average across enterprise deployments. | code.claude.com |
| Anthropic | What 90% of users stay below per active day | $30 a day | Across enterprise deployments. | code.claude.com |
| Anthropic | Claude Code on a Pro, Max or Ultra plan | Within the plan's usage limits | Usage credits, paid separately, let you continue past the limit. | code.claude.com |
How much does Claude Code cost on an API key?#
On a key, Claude Code is billed by the tokens it sends and receives. Every turn carries the conversation so far, the files it reads and the results of the commands it runs, so a long session sends far more tokens than the messages you type. Anthropic's averages in the table above come from companies using it at work, and your cost depends on the model, the size of your codebase and how long your sessions run.
These are the newest Claude models in Claude Code, at our price per million tokens:
Claude Sonnet 5.5DefaultInput$0.60Output$3Context1M
Claude Opus 5.5Input$1.20Output$6Context1M
Claude Fable 5.1Input$3Output$15Context—
Official price from the provider's page, checked October 19, 2026.
All models and pricesAnd this is the default model's price, ours next to the official one:
Official price from the provider's page, checked October 19, 2026.
Which is cheaper for your usage?#
Light use first: a few short sessions a week that send five million tokens a month and get half a million back, on the default model:
5M input tokens and 500K output tokens
Official price from the provider's page, checked October 19, 2026.
Even at the official price, that month costs less than the Pro plan in the table above. If your use looks like this, a key is the cheaper route, and you also pay nothing in the weeks you don't code.
Then heavy use: hours of work every day that send forty million tokens a month and get four million back:
40M input tokens and 4M output tokens
Official price from the provider's page, checked October 19, 2026.
Before caching, at the official price, that month costs more than Anthropic's Max plan in the table above. That is why people who code all day usually pick a plan. At our API price the same month still costs less than the official Max, but for coding every day a 5abeer plan is usually cheaper still; compare on the pricing page.
How to use less on any route#
These habits come from Anthropic's own advice, and they lower your bill on a key and stretch your limits on a plan:
- Clear between tasks: run
/clearwhen you move to unrelated work, so old context isn't sent with every message. - Compact long sessions:
/compactsummarizes the conversation, and you can say what to keep. - Match the model to the task: the default model handles most coding tasks for less. Keep Opus for hard design decisions and multi-step reasoning, and switch with
/model. - Lower the effort: for simple tasks,
/effortreduces thinking, which is billed as output. - Turn off servers you don't use:
/mcplists your MCP servers, and each one adds to the context. - Ask specific questions: "add validation to the login function" reads far fewer files than "improve this codebase".
To see where your usage goes, run /usage inside Claude Code.
Claude Code through 5abeer#
5abeer is an independent service, not affiliated with Anthropic. Its API follows the Anthropic Messages format, so Claude Code works with it as it ships, and both routes cost less than the official price.
With an API key: create a key for Claude models, then set the base URL and key in Claude Code's settings, as below. Full per-OS setup is in the Claude Code guide.
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.5abeer.ai",
"ANTHROPIC_AUTH_TOKEN": "YOUR_5ABEER_API_KEY",
"ANTHROPIC_MODEL": "claude-sonnet-5.5"
}
}
~/.claude/settings.json
Every request is deducted from your balance by model and token count, and you control each key with a spend limit, an expiry date and an IP allow-list. Prices are on Claude API.
With a plan: the 5abeer AI app turns Claude Code on for your plan, with no key and no files to edit. The plan runs with a 5-hour limit and a weekly limit, as in Subscription limits. Plans are for the supported apps, and to use the models from your own code you need an API key. See What each plan runs.
These are our plan prices, as on the pricing page. 5abeer's Max (formerly Max 5x) and Ultra (formerly Max 20x) are our own plans, not the Anthropic plans of the same name:
| 5abeer plan | Best for | Usage limits | Our price |
|---|---|---|---|
| Pro | For everyday use | A 5-hour limit and a weekly limit | 15.99 / month |
| Max (formerly Max 5x) | For heavy daily work | 5× the Pro plan limits | 69.99 / month |
| Ultra (formerly Max 20x) | If you work with it all day | 20× the Pro plan limits | 139.99 / month |
FAQ#
Do I need a paid plan to use Claude Code?#
You need either a plan that includes Claude Code, which starts at Pro, or an API key with a balance. On a key, you pay only for the requests you send.
Can I use a plan and an API key together?#
Yes. Many developers keep a plan for daily work and a key for automation or for when the plan's limit runs out. On 5abeer, API key usage never counts against your plan's limits.
What happens when I hit my plan's limit in Claude Code?#
Claude Code tells you when the limit resets. On 5abeer you can wait, buy a weekly limit reset, move to a higher plan or turn on Continue from the wallet, as explained in When you reach a limit.
Which model should I use in Claude Code?#
Start with the default model, claude-sonnet-5.5, which handles most coding tasks. Move to claude-opus-5.5 or claude-fable-5.1 for the hardest problems. The full list with prices is on the models page.
Does Claude Code behave differently on a 5abeer key?#
No. Claude Code runs exactly as Anthropic ships it, with its commands and settings. Only the base URL and the key change, and /status shows the base URL in use.
Can I pay from Egypt?#
Yes. The ways to pay from Egypt and the steps are in How to pay for the OpenAI or Claude API from Egypt, and the details are on the API in Egypt page.
Get started#
Compare the two routes for Claude in Claude subscription vs API, or create a key and set up Claude Code.
Related guides
- Claude subscription vs API: Pro, Max or Ultra, or per token?Pay-per-token Claude API against a fixed Pro, Max or Ultra plan, with a worked cost example from current prices and when each one fits.
- Claude Pro vs Max: which one do you need?Anthropic's Claude Pro, Max and Ultra compared in its own words from its pricing and support pages: usage, 5-hour and weekly limits, Fable and Claude Code.
- Run Codex CLI with an API key: the complete guideHow to run OpenAI's Codex CLI on an API key instead of a ChatGPT sign-in, what it costs per token, and how to set up a custom provider in config.toml.
Ready to start?
Pick a plan that runs the official apps, or create an API key to use from your own code.