Back to Models
Claude Opus 4.8
anthropicanthropic/claude-opus-4.8
API guide
Chat completion
Standard chat call. TheRouter exposes Anthropic models through the OpenAI-compatible /v1/chat/completions surface.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"anthropic/claude-opus-4.8","messages":[{"role":"user","content":"Refactor this Python function for clarity."}]}'Streaming
Stream tokens as they're produced. With fast mode (speed: 'fast') you get up to 2.5x higher output tokens/sec β useful for long-form generation where latency matters.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-opus-4.8",
"stream": true,
"messages": [{"role": "user", "content": "Explain MoE routing in 200 words."}]
}'Reasoning effort
Opus 4.8 uses adaptive thinking β control depth via reasoning.effort (low/medium/high/xhigh/max). The new default is high on all surfaces. budget_tokens is still unsupported. Anthropic recommends xhigh for complex coding/agent work, high for most tasks, max only when evals show headroom.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-opus-4.8",
"reasoning": {"effort": "xhigh"},
"max_tokens": 65536,
"messages": [{"role": "user", "content": "Diagnose this concurrency bug: ..."}]
}'Tool use
Cursor reports Opus 4.8 uses fewer tool-call steps for the same intelligence, and Devin (Cognition) says it fixes the comment-verbosity and tool-calling issues from Opus 4.7.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-opus-4.8",
"messages": [{"role": "user", "content": "What is the weather in Tokyo right now?"}],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]
}
}
}]
}'Related news
Fact ledger β every claim on this page traces here
| source | URL | retrieved | |
|---|---|---|---|
| Release date | www.anthropic.com β | 2026-06-24 | verified |
| Anthropic model id | platform.claude.com β | 2026-06-24 | verified |
| Training cutoff | β | β | unknown |
| Effort default | platform.claude.com β | 2026-06-24 | verified |
| Minimum cacheable prompt length | platform.claude.com β | 2026-06-24 | verified |
| Fast mode | platform.claude.com β | 2026-06-24 | verified |
| Mid-conversation system messages | platform.claude.com β | 2026-06-24 | verified |
| Deployment | platform.claude.com β | 2026-06-24 | verified |
| License | β | β | verified |
| SWE-bench Verified | www.vellum.ai β | 2026-06-24 | verified |
| SWE-bench Pro | www.vellum.ai β | 2026-06-24 | verified |
| Terminal-Bench 2.1 | www.vellum.ai β | 2026-06-24 | verified |
| Humanity's Last Exam (with tools) | www.vellum.ai β | 2026-06-24 | verified |
| OSWorld-Verified | www.vellum.ai β | 2026-06-24 | verified |
| GPQA Diamond | www.vellum.ai β | 2026-06-24 | verified |
| Anthropic launches Claude Opus 4.8 with fast mode at 3x lower cost and 1,024-token cache minimum | anthropic.com/news β | 2026-06-24 | verified |
| Dynamic workflows launch in Claude Code: hundreds of parallel subagents for codebase-scale migrations | claude.com/blog β | 2026-06-24 | verified |
| What changed from Opus 4.7 to Opus 4.8? | www.anthropic.com β | 2026-06-24 | to verify |
| Does Opus 4.8 support extended thinking with budget_tokens? | platform.claude.com β | 2026-06-24 | to verify |
| What is mid-conversation system messages and why does it matter for agentic loops? | platform.claude.com β | 2026-06-24 | to verify |
| Is Opus 4.8 better than GPT-5.5 for coding? | www.vellum.ai β | 2026-06-24 | to verify |
| What is the pricing for Claude Opus 4.8 on TheRouter? | www.anthropic.com β | 2026-06-24 | to verify |