Home/Models/Anthropic/Claude Sonnet 4.5
C

Claude Sonnet 4.5

輸入:$2.4/M
輸出:$12/M
上下文:200K
最大輸出:64K
Claude Sonnet 4.5 在電腦應用能力方面取得重大躍進。在 OSWorld 這個用於測試 AI 模型處理真實世界電腦任務的基準平台上,Sonnet 4.5 以 61.4% 躍居榜首,而僅四個月前,Sonnet 4 以 42.2% 領先。我們的 Claude for Chrome 擴充功能將這些升級功能付諸實踐。
新
商業用途
Playground
概覽
功能
定價
API
版本

關鍵特性

  • 代理能力: 旨在執行多步驟代理並協調多代理工作流程。
  • 程式設計與軟體使用: Anthropic 將 ==Claude Sonnet 4.5== 定位為其最佳程式設計模型,可完成端到端的軟體工作(設計 → 實作 → 測試 → 部署)。
  • 混合推理/思考模式: 支援按需延展推理(“thinking”),在複雜任務中以更高延遲換取更高準確度。
  • 大上下文與輸出: 宣稱提供 200K 上下文視窗,並支援最高 64K 輸出 Token,可處理超大型輸入/輸出。

技術細節(此版本的變更)

架構與重點:==Claude Sonnet 4.5== 是 Sonnet 系列中階至前沿的模型,針對多步驟工具使用、較長任務跨度,以及與外部系統互動時更具決定性行為進行調校。相較先前 Sonnet 版本,Anthropic 強調在電腦使用(跨檔案、試算表與開發者工具的流程自動化)與推理/數學能力方面的改進。

長時程運行: 本次發佈特別強調模型可作為長時間連續運作的代理(內部與早期客戶測試回報最高可達 ~30 小時 的自主運行),相較於此前僅能多小時的限制有大幅提升。這對需要持續監控、協同編排或多步驟軟體專案的情境至關重要。

工具與上下文:==Claude Sonnet 4.5== 隨附改良的上下文管理與代理工具(上下文編輯、記憶工具、多代理支援),讓開發者能更穩健地管理與持久化代理狀態。

效能基準

  • SWE-bench Verified: 77.2%(200K thinking budget,腳手架 + 工具);在 1M 上下文中為 78.2%;於「高運算量」候選選擇機制下回報 82.0%。
  • OSWorld(電腦任務): Sonnet 4.5 為 61.4%,對比四個月前的 Sonnet 4 為 42.2%。
  • 自主運行時長(內部測試): >30 小時連續自主編碼/代理運作(前代約 ~7 小時)。
  • 作業系統/工具基準: Anthropic 回報在一項 OS 互動基準上由前代的 ~40% 提升至 ~60%——顯示模型在控制軟體時的可靠性提升。

Claude Sonnet 4.5 API
Claude Sonnet 4.5

主要應用場景

  • 軟體工程與程式碼生成: 大規模程式碼合成、多檔案專案生成、自主編碼代理。
  • 代理自動化與協調: 構建長時運作的代理,用於監控系統、執行重複任務並協調工具(行事曆、電子郵件、VM、試算表)。
  • 資料分析與金融/資安流程: 對文件、訴訟摘要、財務模型與資安分流進行深度分析,適用於需要多步推理與可靠工具使用的情境。

如何透過 CometAPI 呼叫 Claude Sonnet 4.5 API

模型版本:

API 呼叫端點cursor 適用端點
claude-sonnet-4-5-20250929-thinkingcometapi-sonnet-4-5-20250929-thinking
claude-sonnet-4-5-20250929cometapi-sonnet-4-5-20250929
claude-sonnet-4-5cometapi-sonnet-4-5

CometAPI 中的 Claude Sonnet 4.5 API 價格,較官方價下調 20%:

  • 輸入 Token:$2.4/ M tokens
  • 輸出 Token:$12/ M tokens

必要步驟

  • 登入至 cometapi.com。若您尚非我們的使用者,請先註冊。
  • 登入您的 CometAPI 控制台。
  • 取得介面的存取憑證 API key。於個人中心的 API token 處點擊「Add Token」,取得 token 金鑰:sk-xxxxx 並提交。

使用方式

  1. 選擇 “ claude-sonnet-4-5-20250929-thinking ” 或 “ claude-sonnet-4-5-20250929","claude-sonnet-4-5 ” 端點發送 API 請求,並設定請求本文。請求方法與請求本文可於我們網站的 API 文件取得;我們也提供 Apifox 測試以供方便。
  2. 將 <YOUR_API_KEY> 替換為您帳戶中的實際 CometAPI 金鑰。
  3. 將您的問題或請求放入 content 欄位——模型將對此做出回應。
  4. 處理 API 回應以取得生成的答案。

API 範例

CometAPI 提供完全相容的 REST API——以便無縫遷移。關鍵細節:

  • Base URL: https://api.cometapi.com/v1/messages
  • Model Names: “ “ claude-sonnet-4-5-20250929-thinking ”或 “ claude-sonnet-4-5-20250929","claude-sonnet-4-5 ”
  • Authentication: 透過 Authorization: Bearer YOUR_CometAPI_API_KEY 標頭傳遞 Bearer token
  • Content-Type:application/json。

以下為呼叫 ==Claude Sonnet 4.5== API 的範例 cURL 程式碼片段:

curl --location --request POST 'https://api.cometapi.com/v1/messages' \
--header 'Authorization: Bearer {{api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "claude-sonnet-4-5-20250929",
"max_tokens": 1000,
"thinking": {
"type": "enabled",
"budget_tokens": 1000
},
"messages": [
{
"role": "user",
"content": "Are there an infinite number of prime numbers such that n mod 4 == 3?"
}
]
}'

常見問題

Can Claude Sonnet 4.5 handle 30+ hours of autonomous coding sessions?

Yes, Claude Sonnet 4.5 excels at sustained long-horizon tasks, maintaining coherence across massive codebases during extended autonomous coding sessions.

How does Claude Sonnet 4.5 compare to GPT-5.2 for agentic workflows?

Claude Sonnet 4.5 is optimized for agents with superior instruction following, tool selection, and self-correction. It achieved 61.4% on OSWorld for computer use tasks, making it particularly strong for browser automation and multi-step workflows.

Does Claude Sonnet 4.5 support extended thinking mode?

Yes, Sonnet 4.5 is a hybrid reasoning model that can deliver instant responses or extended step-by-step thinking. API users have fine-grained control over thinking duration to balance performance with latency.

What is the maximum output token limit for Claude Sonnet 4.5?

Claude Sonnet 4.5 supports up to 64,000 output tokens, which is particularly valuable for rich code generation, detailed planning documents, and long-form content.

Is Claude Sonnet 4.5 suitable for financial analysis and cybersecurity?

Yes, Sonnet 4.5 has enhanced domain knowledge in finance and cybersecurity. It can monitor regulatory changes, perform predictive analysis, and generate creative attack scenarios for red teaming.

When should I choose Claude Sonnet 4.5 over Claude Opus 4.5?

Choose Sonnet 4.5 for high-volume production workloads where you need a balance of advanced capabilities and cost efficiency. Use Opus 4.5 for mission-critical tasks requiring maximum intelligence where cost is secondary.

Does Claude Sonnet 4.5 support computer use and browser automation?

Yes, Sonnet 4.5 excels at computer use capabilities, reliably handling browser-based tasks from competitive analysis to procurement workflows to customer onboarding.

Claude Sonnet 4.5 的功能

探索 Claude Sonnet 4.5 的核心功能,專為提升效能和可用性而設計。了解這些功能如何為您的專案帶來效益並改善使用者體驗。

Claude Sonnet 4.5 的定價

探索 Claude Sonnet 4.5 的競爭性定價,專為滿足各種預算和使用需求而設計。我們靈活的方案確保您只需為實際使用量付費,讓您能夠隨著需求增長輕鬆擴展。了解 Claude Sonnet 4.5 如何在保持成本可控的同時提升您的專案效果。
彗星價格 (USD / M Tokens)官方價格 (USD / M Tokens)ModelDetail.discount
輸入:$2.4/M
輸出:$12/M
輸入:$3/M
輸出:$15/M
-20%

Claude Sonnet 4.5 的範例程式碼和 API

存取完整的範例程式碼和 API 資源,以簡化您的 Claude Sonnet 4.5 整合流程。我們詳盡的文件提供逐步指引,協助您在專案中充分發揮 Claude Sonnet 4.5 的潛力。
Python
JavaScript
Curl
import anthropic
import os

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com"

message = anthropic.Anthropic(
    base_url=BASE_URL,
    api_key=COMETAPI_KEY,
)
messages = message.messages.create(
    model="claude-sonnet-4-5-20250929",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello, Claude"}],
)
print(messages.content[0].text)

Claude Sonnet 4.5的版本

Claude Sonnet 4.5擁有多個快照的原因可能包括:更新後輸出結果存在差異需保留舊版快照以確保一致性、為開發者提供適應與遷移的過渡期,以及不同快照對應全球或區域端點以優化使用者體驗等潛在因素。各版本間的具體差異請參閱官方文件說明。
claude-sonnet-4-5-20250929-thinking
claude-sonnet-4-5-20250929
claude-sonnet-4-5
cometapi-sonnet-4-5-20250929-thinking適合的游標位置
cometapi-sonnet-4-5-20250929適合的游標位置
cometapi-sonnet-4-5適合的游標位置

更多模型