Data residency controls let you manage where your data is processed and stored. Two independent settings govern this:
inference_geo API parameter or as a workspace default.The inference_geo parameter controls where model inference runs for a specific API request. Add it to any POST /v1/messages call.
| Value | Description |
|---|---|
"global" | Default. Inference may run in any available geography for optimal performance and availability. |
"us" | Inference runs only in US-based infrastructure. |
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-opus-5",
max_tokens=1024,
inference_geo="us",
messages=[
{"role": "user", "content": "Summarize the key points of this document."}
],
)
for block in response.content:
if block.type == "text":
print(block.text)
# Check where inference actually ran
print(f"Inference geo: {response.usage.inference_geo}")The response usage object includes an inference_geo field indicating where inference ran:
{
"usage": {
"input_tokens": 25,
"output_tokens": 150,
"inference_geo": "us"
}
}The inference_geo parameter is supported on Claude 4.6 and later models. Requests with inference_geo on Claude Opus 4.5, Claude Sonnet 4.5, Claude Haiku 4.5, or earlier models return a 400 error.
Workspace settings also support restricting which inference geos are available:
allowed_inference_geos: Restricts which geos a workspace can use. If a request specifies an inference_geo not in this list, the API returns an error.default_inference_geo: Sets the fallback geo when inference_geo is omitted from a request. Individual requests can override this by setting inference_geo explicitly.These settings can be configured through the Console or the Admin API under the data_residency field.
Workspace geo is set when you create a workspace and can't be changed afterward. Currently, "us" is the only available workspace geo.
To set workspace geo, create a new workspace in the Console:
Data residency pricing varies by model generation:
inference_geo: "us") is priced at 1.1x the standard rate across all token pricing categories (input tokens, output tokens, cache writes, and cache reads).inference_geo: "global"): Standard pricing applies.inference_geo (see Model availability); standard pricing applies. Requests that include the parameter return a 400 error.This pricing applies to the Claude API (first-party) and Claude Platform on AWS. On Claude in Microsoft Foundry, the same 1.1x multiplier applies to deployments hosted on Azure that use the US Data Zone Standard deployment type. Partner-operated platforms (Bedrock and Google Cloud) have their own regional pricing. See Data residency pricing for details.
The same multiplier applies to Claude Managed Agents: when an agent's model configuration pins inference_geo to "us", model requests in sessions running that agent are priced at 1.1x the standard rate.
The inference_geo parameter is supported on the Batch API. Each request in a batch can specify its own inference_geo value.
If your organization previously opted out of global routing to keep inference in the US, your workspace has been automatically configured with allowed_inference_geos: ["us"] and default_inference_geo: "us". No code changes are required. Your existing data residency requirements continue to be enforced through the new geo controls.
The legacy opt-out was an organization-level setting that restricted all requests to US-based infrastructure. The new data residency controls replace this with two mechanisms:
inference_geo parameter lets you specify "us" or "global" on each API call, giving you request-level flexibility.default_inference_geo and allowed_inference_geos settings in the Console let you enforce geo policies across all keys in a workspace.Your workspace was migrated automatically:
| Legacy setting | New equivalent |
|---|---|
| Global routing opt-out (US only) | allowed_inference_geos: ["us"], default_inference_geo: "us" |
All API requests using keys from your workspace continue to run on US-based infrastructure. No action is needed to maintain your current behavior.
If your data residency requirements have changed and you want to take advantage of global routing for better performance and availability, update your workspace's inference geo settings to include "global" in the allowed geos and set default_inference_geo to "global". See Workspace-level restrictions for details.
Legacy models are unaffected by this migration. For current pricing on newer models, see Pricing.
"us" and "global" are available."us" is currently available. Workspace geo can't be changed after workspace creation.View data residency pricing details.
Learn about workspace configuration.
Track usage and costs by data residency.
Was this page helpful?