Guide

How to move from the OpenAI API to an EU route

What OpenAI, Azure and an EU AI gateway each offer for in-EU processing, when each one fits, and how to switch your code by changing the base URL and the key.

For tech leads, backend engineers and data-platform teams who already use the OpenAI SDK and must keep inference inside the EU or the EEA.

What changes when you move the OpenAI API to an EU route?

Where prompts and completions are processed changes; the shape of your code does not. The OpenAI API processes in the United States by default. To process in the EU you need a service that commits in writing to running inference inside the EU, and your application must send its requests there. In practice that means a new base URL, a new key and sometimes different model names.

Keep two questions apart. The first is where the service you call runs; the second is where the model behind it runs. A gateway in Madrid that forwards your prompt to a global endpoint still sends that prompt out of the EU. Our page on data residency for LLMs explains why the route, not the hosting, decides.

Which options keep OpenAI API traffic in the EU?

As of 3 October 2026 there are three realistic paths: OpenAI’s own Europe data residency, Azure OpenAI in Microsoft Foundry with EU Data Zone or regional deployments, and an AI gateway that enforces an EU tier per project. All three keep the OpenAI SDK; they differ in prerequisites, available models and what you can prove afterwards. For a provider-by-provider view of GPT’s European options, see OpenAI API (GPT) in Europe.

Three ways to move OpenAI API traffic to an EU routeYour application keeps the OpenAI SDK. Option 1: OpenAI's Europe data residency at eu.api.openai.com, EEA plus Switzerland, after OpenAI's approval. Option 2: Azure OpenAI with an EU Data Zone deployment, Microsoft's EU Data Boundary, which may include EFTA. Option 3: an EU gateway with a residency tier per project; at Situra today Gemini on Vertex AI, with GPT routes planned. Your app (OpenAI SDK) 1 · OpenAI Europe residencyeu.api.openai.com · EEA + Switzerlandneeds OpenAI's approval 2 · Azure OpenAI, EU Data ZoneEU Data Boundary, may include EFTAyour endpoint and deployment names 3 · EU gateway, tier per projectbase URL and key changeSitura today: Gemini; GPT planned Facts checked on the providers' pages, 2 October 2026.
All three keep the OpenAI SDK. They differ in who approves access, which models you get and what evidence you keep per request.

1. OpenAI’s Europe data residency

OpenAI offers projects with residency in “Europe (EEA + Switzerland)”, called through the base URL https://eu.api.openai.com. Its documentation says that a non-US region requires approval for abuse-monitoring controls and a signed Modified Retention amendment. There is no single-country option, so a German or Dutch data-protection team gets EEA plus Switzerland, not “Germany only”.

The upside is obvious: you stay with OpenAI, with most of its models and endpoints, such as /v1/responses; check OpenAI’s list of the models and endpoints eligible for data residency before you rely on one. The cost is the approval process, and the scope ends at OpenAI’s own models.

2. Azure OpenAI in Microsoft Foundry

Azure offers several deployment types. With Data Zone Standard (DataZoneStandard) in the EU zone, Microsoft processes prompts and responses inside its EU Data Boundary, which can include EFTA countries such as Norway and Switzerland. With a regional Standard deployment, processing stays inside the chosen Azure geography.

Regional coverage varies a lot by region. Spain Central, for example, lists only text-embedding-3-large as Standard and only gpt-4o (2024-05-13 and 2024-08-06) and gpt-4o-mini (2024-07-18) as Regional Provisioned (reserved PTU capacity); current GPT models reach it through the EU Data Zone or globally. Moving to Azure means switching to your resource endpoint, addressing models by deployment name, and managing subscriptions, quotas and access.

3. An AI gateway with an EU tier

An OpenAI-compatible gateway such as Situra accepts the same requests as the OpenAI API and sends each one to a route allowed by the project’s residency tier: EU or global today (a Spain-tier project is refused until a route in Spain exists). In Situra, if no allowed route is left the request fails with a 503 instead of leaving the tier, and every served response carries a signed attestation naming the route, provider, region and tier.

Situra’s current limit: as of 3 October 2026, production connects only Google Vertex AI, serving Gemini models on the EU route (europe-southwest1 in Madrid, where Google commits to processing within the EU, not specifically in Spain), which global-tier projects use too. GPT routes are planned, not connected.

OpenAI Europe, Azure Data Zone or a gateway: how do they compare?

OpenAI Europe residency, Azure OpenAI and a gateway with an EU tier compared (provider facts checked 2 October 2026)
Criterion OpenAI Europe residency Azure OpenAI (EU Data Zone or regional) Gateway with EU tier (Situra)
Where inference runs EEA + Switzerland Data Zone: Azure EU Data Boundary, may include EFTA. Regional: the Azure geography EU (EFTA where the provider’s commitment includes it), per route
Models Most of OpenAI’s catalogue (residency-eligible models) OpenAI models sold by Azure; regional coverage varies by region Today Gemini on Vertex AI. GPT through Azure OpenAI EU Data Zone: planned, to be verified. Claude and Mistral: planned
Prerequisites OpenAI approval and a retention amendment Azure subscription, resource, deployments and quota Account, EU-tier project and key; organisation activation
Code change Base URL eu.api.openai.com Resource endpoint and deployment names Base URL and key
No capacity in the tier Per OpenAI Per deployment type 503 no_route; never another tier
Per-request evidence Not documented Not documented Ed25519 attestation on every served response
Maturity The model provider Hyperscaler with its own certifications In production since 29 September 2026, single node, no SLA or certification yet

Provider facts checked on their official pages on 2 October 2026 (see sources). Regional offers change often; re-check before you commit.

Which option fits which team?

If you use OpenAI models only and can get through OpenAI’s approval, its Europe residency is the smallest change. If your organisation already runs on Azure and the Microsoft EU Data Boundary satisfies your data-protection lead, an EU Data Zone deployment fits. A gateway earns its place when you want several providers under one residency rule, with evidence for every request.

Practical tests:

  • You need the Responses API, batches, image generation or audio. Stay with OpenAI or Azure: Situra does not offer those endpoints today.
  • You mix GPT with Gemini, Claude or Mistral. A gateway gives you one contract, one key per project and one residency rule; without it you maintain three provider setups.
  • Your DPO or auditor asks for proof. A signed attestation per response shows, request by request, which route and tier were used.
  • You need an SLA or certifications today. Situra has neither yet (its controls are designed for ENS category ALTA, with its certification audit targeted for Q2–Q3 2027); the hyperscalers have both.

For the wider picture, the guide What is an LLM gateway covers what a gateway must do in Europe, and GDPR and LLM APIs covers processor agreements and transfers.

How do you migrate to Situra, step by step?

Your application keeps the official OpenAI SDK, pointed at Situra’s base URL with a situ_ key. At Situra today you also change the model name to gemini-2.5-flash or gemini-2.5-pro (see Gemini API in the EU), because GPT routes are planned, not connected; once a GPT route connects, the base URL and the key are all that change. These steps move an existing application onto an EU-tier project, first with test keys and then with a live key.

  1. Create an account and an EU-tier project. In the console, create your organisation and a project with the EU residency tier. Only owners and admins can change a project’s tier, and every change is audited.

  2. Create a test key and connect it. situ_test_ keys work before your organisation is verified and are served by a sandbox: simulated responses, zero cost. Change the base URL and the key in your client:

    import os
    from openai import OpenAI
    
    client = OpenAI(
        base_url="https://api.situra.ai/v1",
        api_key=os.environ["SITURA_API_KEY"],  # situ_test_… or situ_live_…
    )
    
    completion = client.chat.completions.create(
        model="gemini-2.5-flash",
        messages=[{"role": "user", "content": "Summarise this contract in three sentences."}],
    )
    print(completion.choices[0].message.content)

    In Node.js the option is baseURL:

    import OpenAI from "openai";
    
    const client = new OpenAI({
      baseURL: "https://api.situra.ai/v1",
      apiKey: process.env.SITURA_API_KEY,
    });
  3. Or switch with environment variables only. The official Python and Node.js SDKs read OPENAI_BASE_URL and OPENAI_API_KEY when you pass nothing to the constructor, so you can migrate without a code change:

    export OPENAI_BASE_URL="https://api.situra.ai/v1"
    export OPENAI_API_KEY="situ_test_…"
  4. List the models your project may use. GET /v1/models returns only models with at least one route allowed for the project’s tier. Treat it as the source of truth; the model catalogue on this website is illustrative.

    curl https://api.situra.ai/v1/models \
      -H "Authorization: Bearer $SITURA_API_KEY"
  5. Read the residency headers. Every response served by a route states that route’s tier and region. The output below is illustrative:

    curl -i https://api.situra.ai/v1/chat/completions \
      -H "Authorization: Bearer $SITURA_API_KEY" \
      -H "Content-Type: application/json" \
      -H "x-situra-residency: eu" \
      -d '{"model": "gemini-2.5-flash", "messages": [{"role": "user", "content": "Hello"}]}'
    
    # x-request-id: req_…
    # x-situra-residency: eu
    # x-situra-route-region: europe-southwest1
    # x-situra-attempts: 1
    # x-situra-attestation: eyJhbGciOiJFZERTQSIs…

    The x-situra-residency request header is optional and can only tighten the project’s tier for that request; a looser value is ignored, and anything other than es, eu or global returns 400 invalid_residency.

  6. Store the attestation with your logs. In the Python SDK, with_raw_response exposes the headers and still gives you the parsed object:

    raw = client.chat.completions.with_raw_response.create(
        model="gemini-2.5-flash",
        messages=[{"role": "user", "content": "Hello"}],
    )
    attestation = raw.headers.get("x-situra-attestation")
    request_id = raw.headers.get("x-request-id")
    completion = raw.parse()

    In Node.js, .withResponse() returns { data, response }, with the header on response.headers.

  7. Switch to a live key. Once your organisation is activated, create a situ_live_ key in the same project, set a budget with a hard stop if you need one, and change the environment variable. Prices follow the rule on the pricing page: the provider’s USD list price at the monthly exchange rate plus a 2% currency buffer, and a 5.5% fee on top-ups (minimum €0.80). EU businesses with a valid VAT number are invoiced under reverse charge.

What does not carry over unchanged?

Situra implements OpenAI Chat Completions, Embeddings and Models (the embeddings endpoint exists; embedding models are still to be confirmed in production), plus Anthropic Messages, with streaming, tools and image input. The rest of the OpenAI API either does not exist on the gateway today or behaves differently, so check these before you migrate:

  • Endpoints that return 404: the Responses API (/v1/responses), legacy completions, image generation (/v1/images), audio, files, batches and moderation.
  • store is forced to false, so completions are not saved for later retrieval. The provider’s abuse-monitoring retention still applies (see the GDPR guide).
  • Hosted tools: web_search_options and any tool type other than function or custom are refused with 400 invalid_request.
  • Images by URL: Vertex AI routes do not accept media by URL; send it inline as base64 (if no route is left: 400 remote_media_not_supported).
  • Parameters that change price or location (service_tier, inference_geo) are removed before routing.

How can you check which route served each request?

The x-situra-attestation header is a JWS token signed with Ed25519 that names the route, provider, region, the tier that served the request and the tier it required. You can verify it without trusting Situra, using the public keys at https://api.situra.ai/.well-known/situra-attestation-keys; a verification example is in the OpenAI-compatible API reference. It records what Situra did with the request, not what happens inside the provider.

Which errors should your code handle after the switch?

Errors come back in OpenAI format, with the machine code in error.code. These are the ones that change how an application coming from OpenAI should behave:

Gateway errors that change how an application coming from OpenAI should behave
HTTP Code What to do
404 model_not_found The model has no connected route at Situra (today: any GPT or Claude model). Not transient: switch to gemini-2.5-flash or gemini-2.5-pro
503 no_route No route of the tier serves that model. Not transient: change the model or the tier. Carries x-should-retry: false
429 rate_limit_exceeded Honour retry-after. Defaults: 60 requests and 200,000 tokens per minute per organisation
402 insufficient_balance, budget_exceeded, credit_limit_reached Balance, budget or credit limit exhausted: do not retry in a loop
403 organization_pending_verification Until your organisation is activated, only situ_test_ keys work
400 invalid_residency Invalid x-situra-residency value

The full list of codes and limits is in the developer reference. For tiers and routes in general, see data residency for LLMs and the other guides.

Frequently asked questions

Is changing the OpenAI SDK base URL enough to process in the EU?

Only if the new URL belongs to a service that commits to processing in the EU. With an OpenAI-compatible gateway such as Situra you change the base URL and the key, and the project's residency tier picks the route. OpenAI's Europe residency also means a new base URL, but only after OpenAI approves you. On Azure you also switch to your resource endpoint and deployment names.

What is eu.api.openai.com and who can use it?

It is the base URL for OpenAI projects with Europe data residency, which OpenAI defines as the EEA plus Switzerland. OpenAI's documentation says that using a non-US region requires approval for abuse-monitoring controls and a signed Modified Retention amendment. It covers OpenAI's own models only, and as of 2 October 2026 there is no single-country option.

Does an Azure OpenAI EU Data Zone keep processing in EU member states only?

Not necessarily. Microsoft states that the EU Data Zone follows the Azure EU Data Boundary, which can include EFTA countries such as Norway and Switzerland in addition to EU member states. If your assessment requires member states only, confirm this with Microsoft or use regional deployments, which cover far fewer models.

Can I use GPT models through Situra today?

Not yet. As of 3 October 2026, Situra's production connects only Google Vertex AI, serving Gemini models on the EU and global tiers. Routes to OpenAI, Anthropic, Mistral and Amazon Bedrock are planned, not connected. The list that applies to your project is whatever GET /v1/models returns for your key.

What happens to a project set to the Spain tier?

No model route currently has a provider commitment to processing inside Spain, so requests from a Spain-tier project are refused with 503 no_route instead of being sent to an EU or global route. The response carries x-should-retry: false, so the official SDKs do not retry it. Gemini, the family connected today, runs under the EU tier.

Can I test the migration without paying or using real data?

Yes. Test keys (situ_test_) are served by a sandbox built into the gateway: deterministic, simulated responses with realistic token counts and zero cost. They work before your organisation is verified, so you can wire up the SDK, your tests and CI on day one and switch to a live key later.

Sources

  1. OpenAI: Your data (Europe data residency, retention, training use)
  2. Microsoft Learn: deployment types in Microsoft Foundry Models (Global, Data Zone, Standard)
  3. Microsoft Learn: region availability for Foundry Models sold by Azure
  4. Google Cloud: generative AI data residency on Vertex AI
  5. OpenAI Python SDK (OPENAI_BASE_URL and with_raw_response)
  6. OpenAI Node.js SDK (client reads OPENAI_BASE_URL)

Primary sources checked up to 3 October 2026. Provider terms and regulations change: check the current version. This guide is general information, not legal advice.

Next step: your first request

Test keys are free and return simulated responses, so you can wire up the integration before using real data or paying.

Developer quickstart

Start today, with free test keys

Create a project, choose where its data is processed and change two lines of code.

  • Free test keys (simulated responses)
  • Real models prepaid or invoiced
  • A signed route record on every served response