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
价格在同类中的位置
价格在 60 个同类模型中的位置
这条线显示该模型的价格,在 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,持续至 2026-08-31
- 1M 上下文
- 自适应思考默认开启
- 新分词器(token 数增加约 30%)
- 非默认的采样参数会返回 400
- 不提供 Priority Tier
单个 Prompt —— 通过网关实测
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 工具集;首发优惠价适用至 2026 年 8 月 31 日。
- 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 支持提示词缓存(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)。
相关模型
对比
本页每个值都转录自厂商自己的文档(链接见上),并带有核对日期。价格在全目录范围内比较;各厂商定义不同的规格值,只说明差异而不作图表对比。此处没有任何由我们测量的数据,也不做评分。