Regional environments require initial configuration by Baseten.
Contact support to confirm availability for the region you need and configure regional restrictions for your environments.
How regional environments work
Regional environments build on environments and restricted environments to add region-level placement and routing controls. 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 requests directly to the region-specific workload plane.
Compare regional and standard endpoints
Regional endpoints use a different URL format that maps directly to a region-specific workload plane:Set up regional environments
To set 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 the required region and endpoint restrictions for your environments.
- 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 Domain Name System (DNS) subdomain labels:- Lowercase alphanumeric characters and hyphens only.
- Can’t start or end with a hyphen.
- Maximum 40 characters.
- Baseten reserves
developmentandregion. - Baseten reserves names that start with
region-.
Regional environments apply across all models and Chains in a team. If you name an environment
prod-us on one model or Chain, using prod-us on another model or Chain in the same team applies the same regional restrictions.Deploy to regional environments
Deploy and promote to regional environments the same way as standard environments:- Baseten CLI
- Truss CLI
model push.Promotion behavior
When you promote a deployment to a regional environment, Baseten places its replicas in the configured region. This placement change can require a redeployment.Regional endpoint formats
Regional endpoints embed the environment name in the hostname instead of the URL path:- Model HTTP
- Chain HTTP
- WebSocket
- gRPC
Call a model with
/predict or /async_predict:Request restrictions
Regional endpoints derive the environment from the hostname. Don’t add/environments/, /production/, or /deployment/ to a regional endpoint path. For gRPC, don’t set the x-baseten-environment or x-baseten-deployment metadata headers.
Call a regional endpoint
Regional endpoints accept the same request format as standard predict endpoints:- Python
- cURL
- Node.js
To call a regional endpoint: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.predict.py