Claude Opus 4.8: token counter & pricing
Anthropic · exact (uses official tokenizer) · pricing as of 2026-05-31.
- Provider
- Anthropic
- API model ID
claude-opus-4-8- Context window
- 200,000 tokens
- Input price
- $5.00 per 1M tokens
- Output price
- $25.00 per 1M tokens
- Tokenizer accuracy
- exact (uses official tokenizer)
- Pricing as of
- 2026-05-31
Open the counter to count tokens for Claude Opus 4.8 in real time.
What is Claude Opus 4.8?
Claude Opus 4.8 is Anthropic's flagship model (released 2026-05-28), the most capable model in the Claude family, designed for complex reasoning, long-context tasks, and high-stakes work where output quality matters more than per-call cost. It supersedes Opus 4.7 at the same standard-mode pricing: $5 per 1M input tokens, $25 per 1M output tokens.
How tokens are counted here
Claude Opus uses Anthropic's official /v1/messages/count_tokens endpoint via our serverless proxy. Counts are exact, identical to what Anthropic's billing system will charge you.
The proxy sends the prompt to Anthropic's tokenization endpoint only. The prompt is never logged, never stored, and never used for training (per Anthropic's API policy on count_tokens).
Opus 4.8 inherits the Opus 4.7 tokenizer. Per Anthropic's documentation, this tokenizer can produce up to 35% more tokens than earlier Claude models (Opus 3 and earlier Sonnet/Haiku) for the same text. Our counter shows the live Opus 4.8 count returned by the API, so what you see is what you'll be billed, but if you're comparing Opus 4.8 to Sonnet 4.6 or Haiku in the same table, expect Opus to show a larger token count for identical input. That's the tokenizer change, not a bug.
What's new in Opus 4.8
- Modest but tangible improvements (Anthropic's own framing) in agentic coding, reasoning, knowledge work, and honesty.
- Fast Mode dropped 3x in price vs Opus 4.7's equivalent tier: $10/$50 per 1M tokens (down from $30/$150). Standard mode pricing unchanged. We track Fast Mode as a separate entry (
claude-opus-fast). - Standard mode pricing held flat, so if you were already running on Opus 4.7 at $5/$25 the bill doesn't change when you migrate the model string from
claude-opus-4-7toclaude-opus-4-8.
When to use Claude Opus over Sonnet or Haiku
- Multi-step reasoning where a wrong intermediate step compounds.
- Long-form writing where voice, structure, and nuance matter.
- Code review and architecture critique on substantial diffs.
- Anywhere the cost of a wrong answer dwarfs the cost of a correct one.
For most chatbot, classification, and summarization workloads, Claude Sonnet 4.6 is 5× cheaper and usually indistinguishable in output quality. Use Opus when you've measured Sonnet falling short on your task.
Common questions
Should I use Standard mode or Fast mode?
Standard mode at $5/$25 is the right default. Fast mode at $10/$50 (2x the cost) gets you tokens at roughly 2.5x normal speed — worth it for interactive agent loops and latency-bound chat, not worth it for batch summarization or background workflows where end-to-end time doesn't change the user experience.
Why is Claude Opus pricing so high compared to GPT-4o mini?
GPT-4o mini is positioned as a high-volume, low-cost model; Claude Opus is positioned as a frontier reasoning model. They aren't competing for the same workloads. The comparison that matters is Claude Opus vs GPT-4o vs Gemini 3.1 Pro, those are the frontier-class models.
Does the 200,000-token context window cost more?
No, input is billed per token regardless of where in the context window the token sits. A 100,000-token prompt costs the same per token as a 1,000-token prompt. The total cost just scales with the number of tokens you send.
How do I count tokens for a prompt that includes images or PDFs?
Image and PDF tokens are counted by the same Anthropic endpoint, but our counter only handles text input today. For multimodal token counts, send the request directly to Anthropic's API.
Compare Claude Opus 4.8 to other models
- Claude Opus 4.8 (Fast Mode) (Anthropic, $10.00/$50.00)
- Claude Sonnet 4.6 (Anthropic, $3.00/$15.00)
- Claude Haiku 4.5 (Anthropic, $1.00/$5.00)
- GPT-5.5 (OpenAI, $5.00/$30.00)
- Llama 3.1 405B (Meta, $3.50/$3.50)
- DeepSeek R1 (DeepSeek, $3.00/$7.00)