Claude Sonnet 5 是 Anthropic Sonnet 家族的新一代(「速度与智能的最佳组合」),定位为相对 Sonnet 4.6 的直接替换式能力升级,在编码和智能体任务上提升最大。
- 输入
- 文本 图像 $2/M
- 输出
- 文本 $10/M
- 缓存读取
- $0.2/M
- 上下文
- 1M
- 对比 GPT-4o
- 便宜约 60%
- 知识截止
- 2026-01
Benchmark 成绩
供应商公布: Alibaba (Qwen) Anthropic DeepSeek Google Moonshot OpenAI Tencent Z.ai
价格在同类中的位置
价格在 68 个同类模型中的位置
这条线标出该模型的价格在 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
一条提示词,经网关实测
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 计数暴露出的隐藏思考计费差额。
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 效率。
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),以及结构化输出路径的差异。
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)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://synthorai.io/v1",
apiKey: "sk-syn-...",
});
const resp = await client.chat.completions.create({
model: "claude-sonnet-5",
messages: [{ role: "user", content: "Summarize this diff" }],
reasoning_effort: "medium",
});
console.log(resp.choices[0].message.content);curl https://synthorai.io/v1/chat/completions \
-H "Authorization: Bearer sk-syn-..." \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [{"role": "user", "content": "Hello"}],
"reasoning_effort": "medium"
}'package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
)
func main() {
client := openai.NewClient(
option.WithBaseURL("https://synthorai.io/v1"),
option.WithAPIKey("sk-syn-..."),
)
resp, _ := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{
Model: "claude-sonnet-5",
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("Summarize this diff"),
},
ReasoningEffort: openai.ReasoningEffortMedium,
})
fmt.Println(resp.Choices[0].Message.Content)
}import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.chat.completions.*;
import com.openai.models.ReasoningEffort;
OpenAIClient client = OpenAIOkHttpClient.builder()
.baseUrl("https://synthorai.io/v1")
.apiKey("sk-syn-...")
.build();
ChatCompletion resp = client.chat().completions().create(
ChatCompletionCreateParams.builder()
.model("claude-sonnet-5")
.addUserMessage("Summarize this diff")
.reasoningEffort(ReasoningEffort.MEDIUM)
.build());
System.out.println(resp.choices().get(0).message().content().orElse(""));关于 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)。
相关模型
对比
本页的每个数值都照录自供应商自己的文档(链接见上),并标有核对日期。价格是在整个目录范围内比较的;各家供应商定义不一样的规格项,只说明差异,不画图对比。这里没有任何一项是我们自己测的,也不打分。