Regional environments require initial configuration by Baseten.
Contact support to set up regional restrictions for your environments.
How regional environments work
Regional environments build on environments and restricted environments to add region-level routing guarantees. When Baseten configures regional restrictions for an environment, two things happen:- Replicas are constrained to workload planes within the designated region — deployments promoted to that environment only run in the allowed region.
- A regional inference endpoint becomes available that routes traffic directly to the region-specific workload plane, guaranteeing data stays in the designated region.
Comparing regional and standard endpoints
Standard environment endpoints don’t guarantee regional routing. Traffic may pass through a workload plane outside the intended region depending on DNS resolution. Regional endpoints use a different URL format that maps directly to a region-specific workload plane:| Endpoint type | URL format | Regional guarantee |
|---|---|---|
| Standard | https://model-{model_id}.api.baseten.co/environments/{env_name}/predict | No |
| Regional | https://model-{model_id}-{env_name}.api.baseten.co/predict | Yes |
Calling a regional endpoint
Regional endpoints accept the same request format as standard predict endpoints:- Python
- cURL
- Node.js
Create an
httpx.Client with the regional endpoint as the base_url. Reuse the client across requests for connection pooling. See Configure HTTP clients for recommended timeout and pool settings.Setting up regional environments
- Create environments with region-specific names (for example,
prod-us,prod-eu,staging-eu). Use restricted environments to control access. - Contact Baseten support to configure regional restrictions for your environments. We’ll work with you to set them up per your required specs.
- Update your calling code to use the regional endpoint format:
https://model-{model_id}-{env_name}.api.baseten.co/predict.
Environment naming requirements
Environment names used with regional environments must be valid DNS subdomain labels:- Lowercase alphanumeric characters and hyphens only.
- Can’t start or end with a hyphen.
- Maximum 40 characters.
developmentis a reserved name and can’t be used.
Regional environments apply across all models in a team. If you name an environment
prod-us on one model, creating prod-us on another model in the same team applies the same regional restrictions.