> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valarhq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Geo Control

> Pin your traffic to a regional endpoint instead of the geo-steered global one

## The global endpoint and the regional ones

The base URL used throughout these docs, `https://api.valarhq.ai/v1`, is the **global** endpoint: DNS geo-steering resolves it to the nearest Valar region automatically, so a client in Frankfurt enters through the EU edge and a client in Chicago through the US edge, with failover between regions if one is unhealthy.

If you want to be explicit about which region your traffic enters through — a fixed egress path for firewall rules, reproducible latency, or simply no dependence on where your resolver sits — point at a regional endpoint directly:

| Endpoint | Region |
| - | - |
| `https://us.api.valarhq.ai/v1` | United States |
| `https://eu.api.valarhq.ai/v1` | European Union (Ireland) |

Everything else stays identical: use exactly the same API keys and model slugs from the [dashboard](https://app.valarhq.ai), the same request shapes, and the same [API surface](/api-reference/responses-api/create-a-response). The base URL is the only thing that changes.

## Configure it

<CodeGroup>
  ```python Python theme={"system"}
  import os
  from openai import OpenAI

  client = OpenAI(
      base_url="https://eu.api.valarhq.ai/v1",  # or https://us.api.valarhq.ai/v1
      api_key=os.environ["VALAR_API_KEY"],
  )
  ```

  ```ts TypeScript theme={"system"}
  import OpenAI from "openai";

  const client = new OpenAI({
    baseURL: "https://eu.api.valarhq.ai/v1", // or https://us.api.valarhq.ai/v1
    apiKey: process.env.VALAR_API_KEY,
  });
  ```

  ```bash cURL theme={"system"}
  curl https://eu.api.valarhq.ai/v1/responses \
    -H "Authorization: Bearer $VALAR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "zai-org/GLM-5.2",
      "input": "Hello from the EU edge."
    }'
  ```
</CodeGroup>

No key or workspace changes are needed to switch endpoints — the same key works against the global endpoint and both regional ones, and usage from all three lands in the same reporting.
