返回模型列表

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 模型 idplatform.claude.com ↗2026-07-28已核实
上下文窗口platform.claude.com ↗2026-07-28已核实
最大输出 tokenplatform.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 Tierplatform.claude.com ↗2026-07-28已核实
Tokenizer 迁移www.anthropic.com ↗2026-07-28已核实
部署平台platform.claude.com ↗2026-07-28已核实
许可——已核实
BrowseCompwww.anthropic.com ↗2026-07-28待核实
OSWorld-Verifiedwww.anthropic.com ↗2026-07-28待核实
Mozilla Firefox exploit evaluationwww.anthropic.com ↗2026-07-28已核实
Claude Sonnet 5 Skips Priority Tier: What the Service-Tier Gap Means for Latency-Sensitive Routing TeamsTheRouter news ↗2026-07-28已核实
Claude Sonnet 5 Launches as Anthropic's Most Agentic Sonnet: What the Introductory Pricing Window Means for Routing TeamsTheRouter news ↗2026-07-28已核实
Claude Sonnet 5's Three Breaking API Changes: What Every Operator Must Audit Before MigratingTheRouter 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待核实
帮助与联系