MessagesGoogle Cloud
Claude Models on Google Cloud
比較 Claude Models on Google Cloud (Anthropic managed) 與 Claude Models on Google Cloud (Google managed),並了解您使用的是哪一種。
您可以透過兩種方式,經由您的 Google Cloud 專案使用 Claude:
- Claude Models on Google Cloud (Anthropic managed): 由 Anthropic 營運 Claude API。
- Claude Models on Google Cloud (Google managed): 由 Google 將 Claude 模型作為 Google Cloud's Agent Platform 的一部分進行營運。
兩種 Google Cloud 方案的差異
下表比較 Claude Models on Google Cloud (Anthropic managed) 與 Claude Models on Google Cloud (Google managed)。
| 面向 | Claude Models on Google Cloud (Anthropic managed) | Claude Models on Google Cloud (Google managed) |
|---|---|---|
| API 介面 | Claude API 端點/v1/{endpoint} | Agent Platform 預測端點 |
| 請求格式 | 與 Claude API 相同model 位於請求主體中anthropic-version 標頭 | model 位於 URL 中anthropic_version 位於請求主體中 |
| 串流 | 在請求主體中設定 "stream": true | 獨立的 :streamRawPredict 端點 |
| 位置 | global請參閱專案、位置與工作區解析。 | 全域、多區域或區域端點 請參閱全域、多區域與區域端點。 |
| 早於 Claude 4.6 之模型的模型 ID | Claude API ID 範例: claude-haiku-4-5-20251001 | Claude API ID,並以 @ 取代快照日期前的連字號範例: claude-haiku-4-5@20251001請參閱模型 ID 與版本控制。 |
| 需在專案中啟用的服務 | 請參閱設定您的帳戶。 | Agent Platform APIaiplatform.googleapis.com |
| Anthropic 組織 | 為您的專案建立新的 Anthropic 組織 | 無 |
| 計費 | Google Cloud Marketplace | Google Cloud,計為 Agent Platform 使用量 |
| 速率限制 | 由 Anthropic 管理 | 由 Google Cloud 管理 |
兩種方案的共同點
- 憑證: 兩種方案皆使用 Google Cloud 憑證,包括 Application Default Credentials。您需透過各方案各自的 IAM 角色,分別授予存取權。
- 計費: 兩種方案的費用皆會顯示在您的 Google Cloud 帳單上。
- 模型 ID: Claude 4.6 及更新的模型在兩種方案上皆使用其 Claude API ID。請參閱模型 ID 與版本控制。
- SDK: Anthropic 的用戶端 SDK 支援兩種方案。
在兩種方案之間轉移
請依照您要轉移至的方案之步驟進行:
- 轉移至 Claude Models on Google Cloud (Anthropic managed) 的步驟
- 轉移至 Claude Models on Google Cloud (Google managed) 的步驟
您使用的是哪一種方案?
下表列出可用來識別 Claude Models on Google Cloud (Anthropic managed) 與 Claude Models on Google Cloud (Google managed) 的值。請找出您已有的某個值,例如查看請求 URL 中的主機,或程式碼中的 SDK 用戶端。該值上方的欄位標題即為您使用的方案。
| 檢查項目 | Claude Models on Google Cloud (Anthropic managed) | Claude Models on Google Cloud (Google managed) |
|---|---|---|
| 請求的目的地 | claude.googleapis.comURL 包含您的工作區 ID。 其結尾為 Claude API 路徑,例如 .../invoke/v1/messages。 | 下列其中一個 Agent Platform 主機:aiplatform.googleapis.comaiplatform.us.rep.googleapis.comaiplatform.eu.rep.googleapis.com{region}-aiplatform.googleapis.comURL 路徑包含 .../publishers/anthropic/models/{model}。其結尾為 :rawPredict 或 :streamRawPredict。 |
| 程式碼中的 SDK 用戶端 | AnthropicGoogleCloud在每個 SDK 中,用戶端名稱皆包含 GoogleCloud(在 Go 中為全小寫)。 | AnthropicVertex在每個 SDK 中,用戶端名稱皆包含 Vertex(在 Go 中為全小寫)。 |
| 授予存取權的 IAM 角色 | roles/claude.adminroles/claude.userroles/claude.viewer | Agent Platform IAM 角色 |
| 管理主控台 | Claude Console,位於 platform.claude.com您可從 Google Cloud 主控台開啟。 | Google Cloud 主控台 |
| 各方案在 Google Cloud 主控台中的位置 | 標示為 Anthropic managed 的選項 請參閱設定您的帳戶。 | Model Garden 中的 Claude 模型 |
如果您使用 API 金鑰呼叫 api.anthropic.com,則您並未使用任何一種方案。若要將這些呼叫轉移至 Claude Models on Google Cloud (Anthropic managed),請參閱從既有的 Anthropic 組織遷移。
後續步驟
設定您的帳戶並發出您的第一個請求。
安裝 SDK 並發出您的第一個請求。
查詢權限、角色與稽核記錄類型。
Was this page helpful?