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
sourceURLretrieved
Release datewww.anthropic.com β†—2026-06-24verified
Anthropic model idplatform.claude.com β†—2026-06-24verified
Training cutoffβ€”β€”unknown
Effort defaultplatform.claude.com β†—2026-06-24verified
Minimum cacheable prompt lengthplatform.claude.com β†—2026-06-24verified
Fast modeplatform.claude.com β†—2026-06-24verified
Mid-conversation system messagesplatform.claude.com β†—2026-06-24verified
Deploymentplatform.claude.com β†—2026-06-24verified
Licenseβ€”β€”verified
SWE-bench Verifiedwww.vellum.ai β†—2026-06-24verified
SWE-bench Prowww.vellum.ai β†—2026-06-24verified
Terminal-Bench 2.1www.vellum.ai β†—2026-06-24verified
Humanity's Last Exam (with tools)www.vellum.ai β†—2026-06-24verified
OSWorld-Verifiedwww.vellum.ai β†—2026-06-24verified
GPQA Diamondwww.vellum.ai β†—2026-06-24verified
Anthropic launches Claude Opus 4.8 with fast mode at 3x lower cost and 1,024-token cache minimumanthropic.com/news β†—2026-06-24verified
Dynamic workflows launch in Claude Code: hundreds of parallel subagents for codebase-scale migrationsclaude.com/blog β†—2026-06-24verified
What changed from Opus 4.7 to Opus 4.8?www.anthropic.com β†—2026-06-24to verify
Does Opus 4.8 support extended thinking with budget_tokens?platform.claude.com β†—2026-06-24to verify
What is mid-conversation system messages and why does it matter for agentic loops?platform.claude.com β†—2026-06-24to verify
Is Opus 4.8 better than GPT-5.5 for coding?www.vellum.ai β†—2026-06-24to verify
What is the pricing for Claude Opus 4.8 on TheRouter?www.anthropic.com β†—2026-06-24to verify
Help & contact