新人 免费注册,送 10 次调用,最高 $1,无需绑卡。

Claude Sonnet 5

发布于 2026-06-30

chat代码推理工具调用图像理解提示词缓存

Claude Sonnet 5 是 Anthropic Sonnet 家族的新一代(「速度与智能的最佳组合」),定位为相对 Sonnet 4.6 的直接替换式能力升级,在编码和智能体任务上提升最大。

输入
文本 图像 $2/M
输出
文本 $10/M
缓存读取
$0.2/M
上下文
1M
对比 GPT-4o
便宜约 60%
知识截止
2026-01

Benchmark 成绩

高于同类均值无更高分4 / 221 / 22
Claude Sonnet 5 其他参测模型 同类均值 ★ 没有模型得分更高
DeepSWE 1.1
53.8%
BioMysteryBench hard
34.1%
OSWorld 2.0 Partial score, batch tool enabled
42.6%
Finance Agent v2
53.9%
Harvey Lab-AA
90.1%
HLE-Verified
31%
AutomationBench
10.7%
LVBench
68.5%

供应商公布: Alibaba (Qwen) Anthropic DeepSeek Google Moonshot OpenAI Tencent Z.ai

价格在同类中的位置

价格在 68 个同类模型中的位置

输入$2/M
$0.1 · Dola Seed 2.0 Mini GPT-5.4 Pro · $30
输出$10/M
$0.275 · DeepSeek V4 Flash GPT-5.4 Pro · $180
缓存读取$0.2/M
$0.01 · Claude Haiku 5.5 GPT-5.4 Pro · $15

这条线标出该模型的价格在 Synthorai 同类模型中的位置,两端分别是最便宜和最贵的模型。这里是基础价,批量、区域和缓存写入的折扣见价格页。

规格与限制

Token

上下文窗口(供应商规格) 1,000,000
最大输出(供应商规格) 128,000
知识截止 2026-01

提示词缓存

缓存方式 显式(需开启)
最小前缀 1,024
有效期 默认 5 分钟,可选 1 小时
写入成本 1.25x (5m) / 2x (1h)

思考

供应商参数 thinking.type "adaptive" + output_config.effort
可选值 thinking.type adaptive · disabled; effort low · medium · high · xhigh · max; "enabled" returns 400
默认值 思考开启(adaptive);effort 为 high 请求未指定时生效
可关闭 支持
思考行为 无需任何配置思考即为开启,且与 Opus 5 不同,thinking {type "disabled"} 在任何 effort 档位都被接受;display 默认为 "omitted";早先轮次的思考块会保留在上下文中并按输入计费
参数 reasoning_effort
取值 minimal · low · medium · high 这是网关侧的参数,实际以上方的供应商映射为准

模型

模态 文本 + 图像 → 文本
  • 标准价每 MTok $2/$10(首发优惠价已转为标准价)
  • 1M 上下文
  • 自适应思考默认开启
  • 新分词器(token 数增加约 30%)
  • 非默认的采样参数会返回 400
  • 不提供 Priority Tier

依据 Anthropic 官方文档 ↗

一条提示词,经网关实测

提示词 Explain to a CFO, in exactly three sentences, why our LLM bill doubled after we enabled reasoning. 检查 恰好 3 句

Claude Sonnet 5 通过 · 3 sentences

Reasoning mode works by having the model generate extended internal "thinking" steps before producing its final answer, and since we're billed on total tokens, that hidden reasoning text adds significantly to what we pay for—even though you never see it in the output. This is different from simply getting longer visible responses; the model is essentially "showing its work" behind the scenes, and complex prompts can trigger thousands of extra reasoning tokens per request. The upside is improved accuracy on complex tasks, but if we want to control costs, we should selectively enable reasoning only for queries that truly need it, rather than applying it universally.

输出 194 tok 延迟 4.3 s

指令遵循(恰好三句,数得出来)、受众适配(对 CFO 说话的口吻),以及下方 token 计数暴露出的隐藏思考计费差额。

提示词 This function is supposed to return the longest run of consecutive equal items, but callers report it is off by one on single-element inputs and misses runs that end at the last index. Fix it and explain the bug in one paragraph. 检查 修复通过测试

Claude Sonnet 5 通过 · 8/8 cases

## The Bug The function has two related off-by-one issues rooted in the same cause: `cur` and `best` are initialized to `0` instead of `1`, treating run lengths as the number of *matches* between adjacent elements rather than the number of *elements* in the run. This means a single-element input never enters the loop (since `range(1, 1)` is empty) and returns `0` instead of the correct answer of `1`. It also means that for any input, the run length is undercounted by exactly one — a run of 3 equal elements only produces 2 "match" increments, so `best` ends up as 2 instead of 3. The claim that it "misses runs that end at the last index" is actually a symptom of this same undercount: the logic does update `best` correctly on every iteration (including the last), but because it's counting matches instead of elements, the final reported value is always one less than the true longest run. […]

输出 536 tok 延迟 7.1 s

修复是否真的正确(能运行)、解释的信息密度,以及在一个范围明确的任务上的 token 效率。

提示词 Extract a JSON object with fields {company, quarter, revenue_usd_m, growth_pct, guidance} from this text. Use null for anything not stated; add no other fields. 检查 合法 JSON,严格符合 schema

Claude Sonnet 5 通过 · 5/5 fields, guidance null

```json { "company": "Meridian Robotics", "quarter": "Q3", "revenue_usd_m": 412, "growth_pct": 11.5, "guidance": null } ```

输出 348 tok 延迟 5.3 s

是否严守 schema(不臆造字段)、能否顶住幻觉压力(原文明说暂不给出 guidance),以及结构化输出路径的差异。

提示词 Write a 120-word product announcement for an API gateway feature that caches prompts across providers. Forbidden words: "seamless", "unlock", "game-changer", "revolutionize", "empower". Exactly one sentence must be a question. 检查 120 词,0 个禁用词

Claude Sonnet 5 通过 · 123 words, 0 banned, 1 question

## Introducing Cross-Provider Prompt Caching We're rolling out a new caching layer for our API gateway that works across every major LLM provider you connect through it. Instead of resending identical prompts and paying full price each time, the gateway recognizes repeated requests and serves cached responses in milliseconds—regardless of whether you're routing to OpenAI, Anthropic, or Google. What does this mean for your bill and your latency? Both drop, often significantly, especially for teams running high-volume, repetitive workloads like customer support bots or batch content generation. The cache is configurable per route, with adjustable TTLs and invalidation rules, so you stay in control of freshness versus cost. Available now for all Pro and Enterprise plans. Check your dashboard to enable it today.

输出 259 tok 延迟 4.8 s

是否守住约束(字数预算、禁用词表、只能有一个问句)、文风特征,以及长度控制。

30 秒用上 Claude Sonnet 5

兼容 OpenAI:换掉 base_url,SDK 不用改。POST /v1/chat/completions

from openai import OpenAI

client = OpenAI(
    base_url="https://synthorai.io/v1",
    api_key="sk-syn-...",
)

resp = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Summarize this diff"}],
    reasoning_effort="medium",
)
print(resp.choices[0].message.content)

关于 Claude Sonnet 5

  • Anthropic 把它面向代码生成、数据分析、内容创作、视觉理解和智能体工具调用,并把它作为工作量超出 Sonnet 4.6、又不必转向 Opus 级模型时的选项。
  • 它默认提供 1M token 上下文窗口、128K 最大输出、默认开启且可按力度控制的自适应思考、新分词器、视觉输入和完整的 Claude 工具集;首发优惠价 $2/$10 现已转为标准价。
  • 1M 窗口既是默认值也是上限(没有更小的上下文变体),effort 可达 xhigh,这是其他非 Opus 模型都不提供的,其中 medium 据称大致相当于 Sonnet 4.6 在 high 力度下的水平。
  • 迁移时有三处行为变化值得注意。
  • 新分词器对同样的文本会多产生约 30% 的 token,这在 API 完全不变的情况下改变了用量计数、输出预算和单次请求成本。
  • 非默认采样参数现在会返回错误,这一限制此前只出现在 Opus 4.7 及之后。
  • 而且它是首个带有实时网络安全防护的 Sonnet 档模型,被拒绝的请求会以成功响应返回,携带 refusal 停止原因而非报错。
  • 在 Synthorai 上,Claude Sonnet 5 与目录中其他所有模型走同一个 OpenAI 兼容 API。

常见问题

Claude Sonnet 5 API 可以免费试用吗?

可以。新账号有 10 次试用调用,免费额度最高 $1,无需绑卡。按输入 $2/M 计算,光这笔额度就够向 Claude Sonnet 5 发约 62 次请求,每次 ~8K token。

Claude Sonnet 5 最擅长什么?

编码与智能体任务提升最大、默认 1M token 上下文窗口、从 Sonnet 4.6 直接替换升级。完整介绍见「关于」部分,内容取自供应商的官方发布说明。

Claude Sonnet 5 的价格是多少?

在 Synthorai 上,Claude Sonnet 5 的输入价为 $2/百万 token,输出价为 $10/百万 token。这就是供应商官网价,平台不加价。缓存命中的输入 token 按 $0.2/M 计费。

Claude Sonnet 5 的上下文长度是多少?

Claude Sonnet 5 的上下文长度(上下文窗口)是 1M token。单次回复最多输出 128,000 个 token。

Claude Sonnet 5 支持提示词缓存(prompt caching)吗?

支持,但需要主动开启:用 cache_control 断点标记稳定不变的前缀。缓存命中的输入 token 按 $0.2/M 计费(未命中为 $2/M);提示词的稳定前缀至少要有 1,024 个 token 才能缓存(TTL 默认 5 分钟,可选 1 小时)。 提示词缓存指南 →

如何开通 Claude Sonnet 5?

把现有 OpenAI SDK 的 base_url 指向 "https://synthorai.io/v1",model 设为 "claude-sonnet-5" 即可。一个 API key 就能调用网关上的全部模型。

Claude Sonnet 5 的知识截止日期是什么时候?

Claude Sonnet 5 的知识截止日期是 2026-01,以供应商官方文档为准(核对于 2026-07-09)。

相关模型

对比

本页的每个数值都照录自供应商自己的文档(链接见上),并标有核对日期。价格是在整个目录范围内比较的;各家供应商定义不一样的规格项,只说明差异,不画图对比。这里没有任何一项是我们自己测的,也不打分。

获取 API key 算算你的成本 →