Claude API pricing in 2026: output tokens, extended thinking, and frequent updates change your actual bill beyond what the rate shows.

The price per million tokens you see on Anthropic's pricing page is not what you'll pay at the end of the month. That figure only accounts for input. It's the output—tokens generated by the model—that explodes the bill in most real-world AI agent use cases.
This article details Claude API's current pricing structure, explains why the pricing table almost never predicts the final cost, and provides a method to budget a project without facing surprises on your first invoice.
How much does the claude API cost today
Anthropic evolves its product lineup fast. Very fast, in fact. Claude Opus 4.8 launched on May 28, 2026 with an input price of $5 per million tokens. Just two months later, on July 24, 2026, Anthropic already announced Claude Opus 5, positioned as capable of approaching the performance of its most powerful model at significantly reduced cost, according to Axios.
Two months. That's how long a pricing table stays current in this industry.
On output pricing, the gaps are wide: between $5 and $25 per million tokens depending on which Claude model you choose, versus $6 for OpenAI's codex-mini-latest on comparable tasks. Facing the competition, the gap can be even more striking: xAI's Grok 4.3 charges its input at $1.25 per million tokens, a 1-to-10 ratio compared to Claude Opus 4.8's input.
| Model | Input price (per 1M tokens) | Output price (per 1M tokens) | Note |
|---|---|---|---|
| Claude Opus 4.8 | $5 | in the $5-25 range depending on the model | Launched May 28, 2026 |
| Claude Opus 5 | not fixed at launch | positioned cheaper than the previous top tier | Announced July 24, 2026 |
| Codex-mini-latest (OpenAI) | , | $6 | Comparison reference |
| Grok 4.3 (xAI) | $1.25 | , | 10x cheaper on input than Opus 4.8 |
Anthropic does not systematically communicate a single, stable figure for Sonnet and Haiku across their entire lineup. Let's be clear: the only reliable source remains Anthropic's official pricing page, which should be checked before every client quote. A table frozen in a blog post has a lifespan of a few weeks.
Why the published price doesn't predict your bill
Here's the real problem. Most comparisons stop at input price per token. But an agent that responds in 2,000 tokens costs, at identical input volume, far more than an agent that responds in 200 tokens, and the gap between input and output can reach 5x on the same Claude model, based on observed rates between $5 and $25 per million tokens on output.
Three mechanisms inflate the bill without changing the published price:
Extended reasoning first. Claude models that expose a deep reflection mode generate intermediate tokens before the final response. These reasoning tokens are charged like any output token. An agent that "thinks" longer mechanically consumes more budget, even if the final response stays short.
Then, prompt caching. Anthropic offers a caching mechanism for repeated context, useful when an agent reuses the same system prompt across thousands of calls. The principle reduces cost on already-seen tokens, but the gain depends entirely on prompt structure: context that changes with each call doesn't benefit from it.
Finally, automation by default. Since August 14, 2026, the automatic mode of Claude Code becomes the default setting for sessions of users on Pro, Max, and Team plans, according to Anthropic as cited by InfoWorld. An automatic mode chains API calls without manual validation at each step—convenient, but it means more API calls if nobody watches the volume.
How to evaluate true cost before choosing a model
Never start from a price per token to budget a project. Start from a ratio.
Take a representative sample of your expected requests—ten to twenty real cases are enough for a rough order of magnitude. Count the average token volume in input and output for each. A customer support agent that summarizes tickets will have a very different input/output ratio than an agent that generates long code from a short instruction.
Next, test under real conditions before committing to a fixed quote for a client. Extended reflection mode, if enabled, can multiply output token volume on complex tasks—something invisible in a quick, simple test prompt.
Also compare against market alternatives, not just Claude. We detailed the cost gaps between Claude Code and Codex in a dedicated article: the two tools don't charge the same types of tasks the same way, and the choice depends as much on project context as on raw price. For teams looking for a zero-cost option during the exploration phase, we've also reviewed what's actually free in the AI agent ecosystem—the answer is more nuanced than it appears.
One limitation to know: this estimation method by sampling works well for stable usage over time. It's less reliable for an agent in continuous learning, whose behavior—and therefore generated token volume—evolves over weeks of production.
Conclusion
Three points to remember before budgeting a Claude API project. Input price per token represents only part of the bill; output tokens and extended reasoning often weigh more heavily. The model lineup changes fast—two months passed between Opus 4.8 and Opus 5 in 2026: always check the official pricing page before committing. And automatic mode, now enabled by default on paid Claude Code plans since August 14, 2026, deserves volume monitoring if you don't want end-of-month surprises.
Need help pricing an AI agent project before you get started? The fstck.co team handles this kind of estimation daily.
Frequently asked questions
How much does claude opus 5 API cost compared to claude opus 4.8?
Anthropic presents Opus 5, announced July 24, 2026, as capable of approaching the performance of its most powerful model at reduced cost. The exact pricing detail must be verified on the official Anthropic page, as public communication didn't set a single, durable figure at launch.
Does claude's extended thinking mode increase cost per request?
Yes. Tokens generated during the intermediate reasoning phase are charged as regular output tokens. The longer the model "thinks" before responding, the more volume gets charged, even if the final response stays short.
Should you prefer claude or an alternative like grok or codex to cut costs?
It depends on your use case's input/output ratio. Grok 4.3 charges input ten times cheaper than Claude Opus 4.8, but input price alone isn't enough to compare two models: output quality, need for reasoning tokens, and actual call volume change the equation.
How do you reduce the claude API bill in production?
Prompt caching reduces cost on portions of context reused from one call to the next—useful if your system prompt stays stable. Limiting extended thinking mode to tasks that truly justify it, and monitoring volume generated by automatic modes, also helps keep budget under control.
Is the claude API more expensive than openai's codex API?
On output pricing, Claude shows a range of $5 to $25 per million tokens depending on the model, versus $6 for codex-mini-latest. The positioning therefore depends strongly on which Claude model you choose: an entry-level Haiku and a top-tier Opus don't compare at the same level as Codex.


