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 |
| 預設值 | 思考開啟(自適應);effort 為 high 請求未指定時生效 |
| 可關閉 | 支援 |
| 思考行為 | 無需任何設定思考即為開啟,且與 Opus 5 不同,thinking {type "disabled"} 在任何 effort 等級下都被接受;display 預設為 omitted;較早輪次的 thinking 區塊會保留在上下文中並按輸入計費。 |
| 參數 | reasoning_effort |
| 參數值 | minimal · low · medium · high 這是閘道的參數,實際以上方的供應商對應為準 |
模型
| 模態 | 文字 + 圖像 → 文字 |
|---|
- 標準價每百萬 token $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 視窗既是預設值也是上限(沒有更小的上下文變體),而力度可達 xhigh,這是其他非 Opus 模型都沒有的,其中 medium 被描述為大致相當於 Sonnet 4.6 在 high 力度下的水準。
- 有三項行為變更在遷移時很重要。
- 新的分詞器對同一段文字會產生約多出 30% 的 token,這會在 API 完全不變的情況下改變用量計數、輸出預算與單次請求成本。
- 非預設的取樣參數現在會回傳錯誤,這項限制此前只在 Opus 4.7 及之後的模型上出現過。
- 而它也是第一款帶有即時網路安全防護的 Sonnet 等級模型,被拒絕的請求會以一次成功的回應回傳,其中帶有表示拒絕的停止原因,而不是回傳錯誤。
- 在 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 的輸入價是每百萬 token $2,輸出價是每百萬 token $10。這就是供應商官網價,平台不加價。快取命中的輸入 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 金鑰就能呼叫閘道上的所有模型。
Claude Sonnet 5 的知識截止日期是什麼時候?
Claude Sonnet 5 的知識截止日期為 2026-01,依據供應商官方文件(查核日期:2026-07-09)。
相關模型
比較
本頁每一個數值都摘錄自供應商自己的文件(連結見上方),並附上查核日期。價格是放在整個目錄裡比較;各家供應商定義不一樣的規格,只說明差異,不畫成圖表比較。這裡沒有任何數據是我們自己量測的,也不做評分。