sessionOptions.region when you need a session’s engine processing to run in a specific region. Anam supports two engine regions:
Session region selection is available on Enterprise plans only.
region, Anam selects a region from the request location and its current routing policy. An explicit region takes precedence over that automatic selection, even when automatic geographic routing is disabled.
Request a region
For browser clients, set the region when your server creates the session token. The region is bound to the token and cannot be replaced when the browser starts the session.SessionOptions(region="eu", region_policy="strict").
Choose a region policy
regionPolicy controls what happens when the requested region cannot accept the session.
Use
strict when engine processing must stay in the requested region. Anam returns 400 if you set regionPolicy to strict without a region.
Requests that set region or regionPolicy return 403 with the error code session_region_not_available when session region selection is not enabled for the organization.
If the strict region is unavailable or out of capacity, session start returns 503. Wait briefly before trying the same region again. Anam does not retry a strict session in another region.
Read the served region
A successful engine-session response can include the region that actually served it:preferred, this value can differ from the requested region after a capacity failover. The field is absent when the serving session service does not report its region, so do not infer it from the requested region.
In the JavaScript SDK, call client.getActiveSessionRegion() after the session starts. It returns "eu", "us", or null when no region was reported.
Meeting regions use
eu, us-east, and us-west because they select the meeting bot location. A strict meeting invite also pins its engine session to the corresponding eu or us engine region.Data residency
To keep Anam’s engine processing in a selected region, create the session token withregion: "eu" or region: "us" and regionPolicy: "strict", as shown in Request a region. A strict session is never served from the other region: if the selected engine region is unavailable or out of capacity, session start returns 503 and Anam does not retry in another region.
For example, to keep engine processing in the EU, use region: "eu" and regionPolicy: "strict".
The region is bound to the session token when your server mints it, so browser clients need no changes. To confirm where a session ran, read the served region.
For meeting sessions, send a strict meeting invite, which pins both the meeting bot and engine session to the corresponding region.
