• 訊息
  • 託管代理
  • 管理
Search...
⌘K
組織
Admin API工作區
驗證
概覽工作負載身分聯合WIF 參考
監控
用量與成本 API速率限制 APIClaude Code 分析 API
資料與合規
資料駐留API 與資料保留
合規 API
概覽取得存取權活動動態對話、檔案與專案組織、使用者、角色與群組設計您的整合錯誤常見問題
Log in
資料駐留
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Solutions

  • AI agents
  • Code modernization
  • Coding
  • Customer support
  • Education
  • Financial services
  • Government
  • Life sciences

Partners

  • Amazon Bedrock
  • Google Cloud's Vertex AI

Learn

  • Blog
  • Courses
  • Use cases
  • Connectors
  • Customer stories
  • Engineering at Anthropic
  • Events
  • Powered by Claude
  • Service partners
  • Startups program

Company

  • Anthropic
  • Careers
  • Economic Futures
  • Research
  • News
  • Responsible Scaling Policy
  • Security and compliance
  • Transparency

Learn

  • Blog
  • Courses
  • Use cases
  • Connectors
  • Customer stories
  • Engineering at Anthropic
  • Events
  • Powered by Claude
  • Service partners
  • Startups program

Help and security

  • Availability
  • Status
  • Support
  • Discord

Terms and policies

  • Privacy policy
  • Responsible disclosure policy
  • Terms of service: Commercial
  • Terms of service: Consumer
  • Usage policy
管理/資料與合規

資料駐留

透過地理位置控制來管理模型推論的執行位置以及資料的儲存位置。

此功能符合「Zero Data Retention」(零資料保留),即 ZDR 的資格。當您的組織具有 ZDR 安排時,透過此功能傳送的資料在 API 回應返回後不會被儲存。

資料駐留控制讓您能夠管理資料的處理與儲存位置。有兩個獨立的設定負責管理此功能:

  • Inference geo(推論地理位置): 以每個請求為基礎,控制模型推論的執行位置。可透過 inference_geo API 參數設定,或作為工作區預設值。
  • Workspace geo(工作區地理位置): 控制靜態資料的儲存位置,以及端點處理(例如圖片轉碼和程式碼執行)的發生位置。在 Claude Console 中於工作區層級進行設定。

Claude Managed Agents 不支援 inference_geo 參數,但會遵循在 Console 中設定的 Workspace geo。使用自行託管的沙箱時,工具執行和沙箱檔案系統會保留在您控制的基礎架構上。

Inference geo(推論地理位置)

inference_geo 參數控制特定 API 請求的模型推論執行位置。將其加入任何 POST /v1/messages 呼叫中即可。

值說明
"global"預設值。推論可在任何可用的地理位置執行,以獲得最佳效能和可用性。
"us"推論僅在美國的基礎架構上執行。

API 使用方式

client = anthropic.Anthropic()

response = client.messages.create(
    model="claude-opus-4-8",
    max_tokens=1024,
    inference_geo="us",
    messages=[
        {"role": "user", "content": "Summarize the key points of this document."}
    ],
)

print(response.content[0].text)
# 檢查推論實際執行的位置
print(f"Inference geo: {response.usage.inference_geo}")

回應

回應的 usage 物件包含一個 inference_geo 欄位,指出推論的執行位置:

Output
{
  "usage": {
    "input_tokens": 25,
    "output_tokens": 150,
    "inference_geo": "us"
  }
}

模型可用性

inference_geo 參數支援 Claude Opus 4.6、Claude Sonnet 4.6 及更新的模型。在 Claude Opus 4.5、Claude Sonnet 4.5、Claude Haiku 4.5 或更早的模型上使用 inference_geo 的請求會回傳 400 錯誤。

inference_geo 參數可在 Claude API(第一方)和 Claude Platform on AWS 上使用。在 Amazon Bedrock、Vertex AI 和 Microsoft Foundry 上,推論區域由端點 URL 或推論設定檔決定,因此 inference_geo 不適用。inference_geo 參數也無法透過 OpenAI SDK 相容性端點使用。

工作區層級限制

工作區設定也支援限制可用的推論地理位置:

  • allowed_inference_geos: 限制工作區可使用的地理位置。如果請求指定的 inference_geo 不在此清單中,API 會回傳錯誤。
  • default_inference_geo: 設定當請求中省略 inference_geo 時的備用地理位置。個別請求可透過明確設定 inference_geo 來覆寫此設定。

這些設定可透過 Console 或 Admin API 在 data_residency 欄位下進行設定。

Workspace geo(工作區地理位置)

Workspace geo 在您建立工作區時設定,之後無法變更。目前,"us" 是唯一可用的工作區地理位置。

若要設定 Workspace geo,請在 Console 中建立新的工作區:

  1. 前往 Settings > Workspaces。
  2. 建立新的工作區。
  3. 選取工作區地理位置。

Claude Platform on AWS: Workspace geo 無法設定。工作區是透過 AWS Console 佈建的,而 Claude Console 的 Workspaces 頁面為唯讀。此平台上的 Claude Managed Agents 工作階段會以 "us" 作為有效的 Workspace geo 執行,這也是目前唯一可用的工作區地理位置。請參閱 Claude Platform on AWS 以了解該平台特有的資料駐留考量。

定價

資料駐留定價因模型世代而異:

  • Claude Opus 4.6、Claude Sonnet 4.6 及更新版本: 僅限美國的推論(inference_geo: "us")在所有 token 定價類別(輸入 token、輸出 token、快取寫入和快取讀取)中,價格為標準費率的 1.1 倍。
  • 全球路由(inference_geo: "global"):適用標準定價。
  • 較舊的模型: 不支援 inference_geo(請參閱模型可用性);適用標準定價。包含此參數的請求會回傳 400 錯誤。

此定價適用於 Claude API(第一方)和 Claude Platform on AWS。合作夥伴營運的平台(Bedrock 和 Vertex AI)有各自的區域定價。詳情請參閱資料駐留定價。

如果您使用 Priority Tier,僅限美國推論的 1.1 倍乘數也會影響 token 計入您 Priority Tier 容量的方式。使用 inference_geo: "us" 消耗的每個 token 會從您承諾的 TPM 中扣除 1.1 個 token,這與其他定價乘數(例如提示快取)影響消耗率的方式一致。

Batch API 支援

Batch API 支援 inference_geo 參數。批次中的每個請求都可以指定自己的 inference_geo 值。

從舊版退出設定遷移

如果您的組織先前已退出全球路由以將推論保留在美國,您的工作區已自動設定為 allowed_inference_geos: ["us"] 和 default_inference_geo: "us"。無需變更程式碼。您現有的資料駐留需求將繼續透過新的地理位置控制來強制執行。

變更內容

舊版退出設定是一個組織層級的設定,會將所有請求限制在美國的基礎架構上。新的資料駐留控制以兩種機制取代此設定:

  • 每個請求的控制: inference_geo 參數讓您可以在每個 API 呼叫上指定 "us" 或 "global",提供請求層級的彈性。
  • 工作區控制: Console 中的 default_inference_geo 和 allowed_inference_geos 設定讓您可以在工作區的所有金鑰上強制執行地理位置政策。

您的工作區發生了什麼變化

您的工作區已自動遷移:

舊版設定新的對應設定
全球路由退出(僅限美國)allowed_inference_geos: ["us"]、default_inference_geo: "us"

使用您工作區金鑰的所有 API 請求將繼續在美國的基礎架構上執行。無需採取任何動作即可維持您目前的行為。

如果您想使用全球路由

如果您的資料駐留需求已變更,且您想利用全球路由以獲得更好的效能和可用性,請更新您工作區的推論地理位置設定,在允許的地理位置中加入 "global",並將 default_inference_geo 設定為 "global"。詳情請參閱工作區層級限制。

定價影響

舊版模型不受此遷移影響。如需較新模型的目前定價,請參閱定價。

目前的限制

  • 共用速率限制: 速率限制在所有地理位置之間共用。
  • Inference geo: 僅提供 "us" 和 "global"。
  • Workspace geo: 目前僅提供 "us"。工作區建立後無法變更 Workspace geo。

後續步驟

定價

檢視資料駐留定價詳情。

工作區

了解工作區設定。

Usage and Cost API

依資料駐留追蹤使用量和成本。

Was this page helpful?

  • Inference geo(推論地理位置)
  • API 使用方式
  • 回應
  • 模型可用性
  • 工作區層級限制
  • Workspace geo(工作區地理位置)
  • 定價
  • Batch API 支援
  • 從舊版退出設定遷移
  • 變更內容
  • 您的工作區發生了什麼變化
  • 如果您想使用全球路由
  • 定價影響
  • 目前的限制
  • 後續步驟