# CLOUD_ML_REGION

> It sets the Google Cloud region Claude Code uses.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLOUD_ML_REGION=global

## Think of it like

It is like you pick which town's post office handles your mail.

## Definition

CLOUD_ML_REGION sets the Google Cloud region Claude Code uses on Agent Platform. It can be global, a multi-region such as eu, or one region. If it is not set, or not shaped like a region, Claude Code uses us-east5. A model can have its own region that wins over this one.

## Example

Emma sets this to global, so Google picks a region with room. One model has no global spot, so she gives it its own region.

## Example code

```bash
export CLAUDE_CODE_USE_VERTEX=1
export CLOUD_ML_REGION=global
export ANTHROPIC_VERTEX_PROJECT_ID=my-project
claude
```

Run on Google Cloud's global endpoint.

## Why it matters

The region decides which models you can reach and where your data is handled.

## Common mistake

Setting global and thinking every model will work. Some only run in a few regions and need their own set.

## Three principles

- **global, multi or one.** Three kinds.
- **Default us-east5.** When unset.
- **Per-model wins.** VERTEX_REGION_ variables.

## Related terms

- [VERTEX_REGION_CLAUDE_* Variables](https://learn.benibix.com/term/ai/vertex-region-claude-variables)
- [ANTHROPIC_VERTEX_PROJECT_ID](https://learn.benibix.com/term/ai/anthropic-vertex-project-id-variable)
- [Gemini Enterprise Agent Platform](https://learn.benibix.com/term/ai/gemini-enterprise-agent-platform)

## Told apart from

- [CLOUD_ML_REGION vs VERTEX_REGION_CLAUDE_*](https://learn.benibix.com/compare/cloud-ml-region-variable-vs-vertex-region-claude-variables): People think CLOUD_ML_REGION and the VERTEX_REGION_CLAUDE_ variables do the same job. One sets the region for every model. The other sets it for one model. Claude Code checks the model's own variable first. If it is not set, it uses CLOUD_ML_REGION, and then us-east5. Set CLOUD_ML_REGION once. Add a model's own only when that model needs a different region.

![On Google Cloud, a model's own region wins, then CLOUD_ML_REGION, then us-east5.](https://learn.benibix.com/diagrams/env-vertex-region.svg)

---

Source: https://learn.benibix.com/term/ai/cloud-ml-region-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
