返回模型列表
Claude Opus 4.8
anthropicanthropic/claude-opus-4.8
API 使用指南
Chat 调用
标准 chat 调用。TheRouter 通过 OpenAI 兼容的 /v1/chat/completions 接口提供 Anthropic 模型。
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."}]}'流式输出
边生成边推送 token。启用 fast 模式(speed: 'fast')可获得最高 2.5 倍的输出 token 速度,对长文生成很有价值。
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."}]
}'推理强度
Opus 4.8 使用 adaptive thinking——通过 reasoning.effort(low/medium/high/xhigh/max)控制深度。新的默认值在所有平台均为 high。budget_tokens 仍不支持。Anthropic 建议复杂编程和 agent 任务用 xhigh,大多数任务用 high,只有在 evals 证明有提升空间时才用 max。
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: ..."}]
}'工具调用
Cursor 报告 Opus 4.8 在达到相同智能水平时使用更少的工具调用步骤;Devin(Cognition)称其修复了 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"]
}
}
}]
}'相关新闻
事实档案 — 本页每条断言可在此回溯来源
| 来源 | URL | 采集于 | |
|---|---|---|---|
| 发布日期 | www.anthropic.com ↗ | 2026-06-24 | 已核实 |
| Anthropic 模型 id | platform.claude.com ↗ | 2026-06-24 | 已核实 |
| 训练数据截止 | — | — | 未知 |
| 推理强度默认档位 | platform.claude.com ↗ | 2026-06-24 | 已核实 |
| 最短可缓存 prompt 长度 | platform.claude.com ↗ | 2026-06-24 | 已核实 |
| Fast 模式 | platform.claude.com ↗ | 2026-06-24 | 已核实 |
| 会话中途系统消息 | platform.claude.com ↗ | 2026-06-24 | 已核实 |
| 部署平台 | platform.claude.com ↗ | 2026-06-24 | 已核实 |
| 许可 | — | — | 已核实 |
| SWE-bench Verified | www.vellum.ai ↗ | 2026-06-24 | 已核实 |
| SWE-bench Pro | www.vellum.ai ↗ | 2026-06-24 | 已核实 |
| Terminal-Bench 2.1 | www.vellum.ai ↗ | 2026-06-24 | 已核实 |
| Humanity's Last Exam (with tools) | www.vellum.ai ↗ | 2026-06-24 | 已核实 |
| OSWorld-Verified | www.vellum.ai ↗ | 2026-06-24 | 已核实 |
| GPQA Diamond | www.vellum.ai ↗ | 2026-06-24 | 已核实 |
| Anthropic 发布 Claude Opus 4.8:Fast 模式降价 3 倍,prompt 缓存门槛降至 1,024 token | anthropic.com/news ↗ | 2026-06-24 | 已核实 |
| Claude Code 推出 Dynamic Workflows:数百个并行 subagent 处理代码库级别迁移 | claude.com/blog ↗ | 2026-06-24 | 已核实 |
| Opus 4.7 到 Opus 4.8 改了什么? | www.anthropic.com ↗ | 2026-06-24 | 待核实 |
| Opus 4.8 支持 budget_tokens 的 extended thinking 吗? | platform.claude.com ↗ | 2026-06-24 | 待核实 |
| 什么是会话中途系统消息,它对 agent 循环有什么意义? | platform.claude.com ↗ | 2026-06-24 | 待核实 |
| Opus 4.8 在编程上比 GPT-5.5 强吗? | www.vellum.ai ↗ | 2026-06-24 | 待核实 |
| Claude Opus 4.8 在 TheRouter 上的定价是多少? | www.anthropic.com ↗ | 2026-06-24 | 待核实 |