返回模型列表

Claude Sonnet 4

anthropicanthropic/claude-sonnet-4

供应商自营与 TheRouter 服务形态的差异

供应商自己运营时

Anthropic 生命周期表将原生 Claude API id 'claude-sonnet-4-20250514' 标记为已在 Anthropic 运营平台退役,时间线为 2026-04-14 宣布废弃、2026-06-15 退役。Anthropic 建议迁移到 'claude-sonnet-4-6'。

在 TheRouter 上

TheRouter 仍保留公开模型页和 OpenAI 兼容 id 'anthropic/claude-sonnet-4',方便需要稳定引用的客户核对;但新集成应路由到 'anthropic/claude-sonnet-4.6',因为上游退役会影响实时可用性和支持保障。

API 使用指南

Chat 调用

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/claude-sonnet-4","messages":[{"role":"user","content":"Hello"}]}'

扩展思考

通过 reasoning 参数(low/medium/high)或在请求中包含 thinking budget 来启用扩展思考。

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/claude-sonnet-4","messages":[{"role":"user","content":"Solve this step by step"}],"reasoning":{"effort":"high"}}'

近期动态

事实档案 — 本页每条断言可在此回溯来源
来源URL采集于
发布日期www.anthropic.com ↗2026-05-25已核实
Anthropic 模型 idaws.amazon.com ↗2026-05-25已核实
训练数据截止——未知
上下文窗口platform.claude.com ↗2026-09-10已核实
最大输出 tokenwww.anthropic.com ↗2026-05-25已核实
推理模式www.anthropic.com ↗2026-05-25已核实
部署平台aws.amazon.com ↗2026-05-25已核实
许可——已核实
SWE-bench Verifiedwww.anthropic.com ↗2026-05-25已核实
GPQA Diamondwww.anthropic.com ↗2026-05-25已核实
MMMLUwww.anthropic.com ↗2026-05-25已核实
MMMUwww.anthropic.com ↗2026-05-25已核实
AIMEwww.anthropic.com ↗2026-05-25已核实
OSWorldwww.anthropic.com ↗2026-05-25已核实
Anthropic 在 Claude API 上废弃 Claude Sonnet 4platform.claude.com/model-deprecations ↗2026-09-10已核实
Claude Sonnet 4.5 以相同 $3/$15 Sonnet 价格层发布anthropic.com/news ↗2026-09-10已核实
新的 TheRouter 集成还应该选择 Claude Sonnet 4 吗?platform.claude.com ↗2026-09-10待核实
与 Sonnet 4 最初发布页相比,后续有什么变化?www.anthropic.com ↗2026-09-10待核实
TheRouter 的 OpenAI 兼容接口会改变 Anthropic 的退役状态吗?platform.claude.com ↗2026-09-10待核实
帮助与联系