返回模型列表
Claude Sonnet 5
anthropicanthropic/claude-sonnet-5
API 使用指南
Chat 调用
普通文本、编码和文档提示可使用 TheRouter 的 OpenAI 兼容端点。除非确认会解析为 Anthropic 默认值,否则请省略 sampling 参数。
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-5","messages":[{"role":"user","content":"Audit this migration plan for hidden production risks."}],"max_tokens":2000}'工具调用代理
Sonnet 5 在能够规划、调用工具并验证结果时最强。请保持工具 schema 精简,并显式设置 effort 以获得可预测的延迟/成本。
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-5","messages":[{"role":"user","content":"What is the order status for invoice INV-1042?"}],"tools":[{"type":"function","function":{"name":"lookup_invoice","description":"Look up invoice status by id","parameters":{"type":"object","properties":{"invoice_id":{"type":"string"}},"required":["invoice_id"]}}}],"tool_choice":"auto","reasoning_effort":"medium","max_tokens":1500}'视觉输入
Claude Sonnet 5 支持文本和图片输入、文本输出。需要 1M 上下文和代理式跟进的视觉问答、UI 排查、文档截图任务可路由到这里。
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-5","messages":[{"role":"user","content":[{"type":"text","text":"Find the blocking UX issue in this screenshot."},{"type":"image_url","image_url":{"url":"https://example.com/screenshot.png"}}]}],"max_tokens":1200}'近期动态
事实档案 — 本页每条断言可在此回溯来源
| 来源 | URL | 采集于 | |
|---|---|---|---|
| 发布日期 | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| Claude API 模型 id | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| 上下文窗口 | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| 最大输出 token | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| 定价 | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| Prompt 缓存 | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| 训练数据截止 | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| 可靠知识截止 | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| 推理控制 | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| 不支持的控制项 | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| Priority Tier | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| Tokenizer 迁移 | www.anthropic.com ↗ | 2026-07-28 | 已核实 |
| 部署平台 | platform.claude.com ↗ | 2026-07-28 | 已核实 |
| 许可 | — | — | 已核实 |
| BrowseComp | www.anthropic.com ↗ | 2026-07-28 | 待核实 |
| OSWorld-Verified | www.anthropic.com ↗ | 2026-07-28 | 待核实 |
| Mozilla Firefox exploit evaluation | www.anthropic.com ↗ | 2026-07-28 | 已核实 |
| Claude Sonnet 5 Skips Priority Tier: What the Service-Tier Gap Means for Latency-Sensitive Routing Teams | TheRouter news ↗ | 2026-07-28 | 已核实 |
| Claude Sonnet 5 Launches as Anthropic's Most Agentic Sonnet: What the Introductory Pricing Window Means for Routing Teams | TheRouter news ↗ | 2026-07-28 | 已核实 |
| Claude Sonnet 5's Three Breaking API Changes: What Every Operator Must Audit Before Migrating | TheRouter news ↗ | 2026-07-28 | 已核实 |
| Claude Sonnet 5 可以直接替换 Claude Sonnet 4.6 吗? | platform.claude.com ↗ | 2026-07-28 | 待核实 |
| 通过 TheRouter 使用 Claude Sonnet 5 的成本是多少? | platform.claude.com ↗ | 2026-07-28 | 待核实 |
| Claude Sonnet 5 支持 Priority Tier 吗? | platform.claude.com ↗ | 2026-07-28 | 待核实 |
| Claude Sonnet 5 应该设置 temperature 吗? | platform.claude.com ↗ | 2026-07-28 | 待核实 |
| 路由团队应该如何测试新 tokenizer? | www.anthropic.com ↗ | 2026-07-28 | 待核实 |