Claude Sonnet 5
廠商牌價,無平台加價,按用量計費。 以下為官方 list 價。已登入的使用者可在 /console/pricing 查看含工作空間折扣的實際價格。 以 70% 快取命中率計算的等效輸入價:$0.74/M. 透過顯式 cache_control 斷點開啟;快取讀取按輸入價的 0.1 倍計費,快取寫入有 1.25 倍(5 分鐘 TTL)或 2 倍(1 小時 TTL)加成;各模型有各自的最小前綴長度要求。
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
Claude Sonnet 5 是 Anthropic Sonnet 家族的新一代,官方稱它是「速度與智慧的最佳組合」。
- 它定位為相對 Sonnet 4.6 的直接替換式能力升級,在編碼和智慧體任務上提升最大。
- 它預設提供 1M token 上下文視窗、128K 最大輸出、預設開啟且可按力度控制的自適應思考、新分詞器、視覺輸入和完整的 Claude 工具集;首發優惠價適用至 2026 年 8 月 31 日。
- 在 Synthorai 上,Claude Sonnet 5 與目錄中其他所有模型走同一個 OpenAI 相容 API。
規格與限制
| 最大輸出(廠商規格) | 128,000 |
| 模態 | text + image → text |
| 特性 | tools · parallel_tool_calls · structured_output · streaming · vision · batch · caching · reasoning · computer_use |
| 備註 | Introductory pricing $2/$10 per MTok through 2026-08-31; 1M context; adaptive thinking on by default; new tokenizer (~30% more tokens); non-default sampling params return 400; no Priority Tier. |
| 提示詞快取 | 顯式(需開啟) · 最小前綴 1,024 token · TTL 5m default, 1h option · 寫入 1.25x (5m) / 2x (1h) |
常見問題
Claude Sonnet 5 API 可以免費試用嗎?
可以,新帳號可獲得 10 次試用呼叫和最高 $1 的免費額度,無需信用卡。以輸入 $2/M 計算,光是這筆額度就足以對 Claude Sonnet 5 發出約 62 次 ~8K token 的請求。
Claude Sonnet 5 最擅長什麼?
編碼與智慧體任務提升最大,以及預設 1M token 上下文視窗和從 Sonnet 4.6 直接替換升級。完整能力請見 About 一節,內容取自廠商官方發布說明。
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 5m default, 1h option)。 提示詞快取指南 →
如何開通 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)。