翻篇收录说明
翻篇网页快照

In-Region Routing - Keep AI Requests in Europe or the US

https://openrouter.ai/docs/guides/features/in-region-routing

最近抓取:2026-12-04 12:51:03(北京时间)

最近内容变化:2026-12-01 20:13:58(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Keep prompts and completions in Europe or the US

正文摘录

In-Region Routing (IRR) processes the prompts and completions in your requests within a designated region. When you send a request through a region-specific base URL, the request is decrypted within that region and routed only to shared provider endpoints in that region: Europe (the EU/EEA, the UK, and Switzerland) for eu.openrouter.ai, and the US for us.openrouter.ai. If no endpoint eligible for the region (shared, BYOK, or private) can serve the request, it errors instead of leaving the region. Requests served by your own BYOK key go to your deployment’s region, which you control. Account and operational records are handled separately; see What stays outside the region. EU in-region routing (eu.openrouter.ai) and US in-region routing (us.openrouter.ai) are available on the Business and Enterprise plans. There is no setting to turn on: once your account is on one of these plans, you choose the region for each request by sending it to that region’s base URL. Organization admins can upgrade to Business in Settings > Manage plan. For Enterprise, contact our enterprise team. Using In-Region Routing Send API requests through the region-specific base URL: https://eu.openrouter.ai https://us.openrouter.ai TypeScript SDKTypeScript (fetch)PythoncURLGoimport { OpenRouter } from '@openrouter/sdk'; const openRouter = new OpenRouter({ apiKey: '<OPENROUTER_API_KEY>', serverURL: 'https://eu.openrouter.ai/api/v1', }); const response = await openRouter.responses.send({ responsesRequest: { model: 'anthropic/claude-sonnet-5', input: 'Hello', stream: false, }, }); console.log(JSON.stringify(response, null, 2)); Output{ "background": false, "completedAt": 1794949763, "createdAt": 1794949762, "error": null, "frequencyPenalty": 0, "id": "gen-1794949762-baVyTiNTGmDBTu0WJ7v9", "incompleteDetails": null, "instructions": null, "maxOutputTokens": null, "maxToolCalls": null, "metadata": {}, "model": "anthropic/claude-sonnet-5", "object": "response", "output": [ { "content": [ { "annotations": [], "logprobs": [], "text": "Hi there! How can I help you today?", "type": "output_text" } ], "id": "msg_tmp_ait7yr1q3z", "role": "assistant", "status": "completed", "type": "message" } ], "parallelToolCalls": true, "presencePenalty": 0, "previousResponseId": null, "promptCacheKey": null, "promptCacheOptions": null, "reasoning": { "effort": "high" }, "safetyIdentifier": null, "serviceTier": "default", ... This output is a truncated excerpt from the TypeScript SDK tab, which returns camelCase field names. The fetch, Python, cURL, and Go tabs print the same response with the snake_case names the API returns, such as service_tier and created_at. How Requests Are Routed On a regional domain, OpenRouter filters the candidate endpoints for your request down to those whose provider infrastructure is located in that region. If OpenRouter has not onboarded an endpoint for the requested model to that region, the request fails with an error rather than falling back to an out-of-region endpoint. A provider might serve the model from infrastructure in the region, but the endpoint is only eligible once OpenRouter has onboarded it for EU or US routing. See Finding In-Region Models for the current list. In-region routing fails closed: OpenRouter never silently routes a regional request outside the region. Two categories of endpoints are always excluded from regional routing even if the model is otherwise available: Global / cross-region deployments. Provider deployments that can process requests in any region (for example, Bedrock global. cross-region inference profiles or Vertex global locations) do not guarantee residency and are not eligible. For a Bedrock BYOK key on a regional domain, models invoked through a cross-region profile are sent the matching geographic profile (us. or eu.) instead. Models invoked by foundation model ID, and OpenAI models served through the Bedrock Runtime OpenAI-compatible API, are not rewritten; see Choosing a Cross-Region Inference Profile. Multi-model routers. Router-type models (such as the Auto Router) are excluded from regional model lists. Regional Endpoints on the Global Domain Some providers bill a premium for serving a model from a specific region. OpenRouter detects the premium from the endpoint’s own pricing: a regional endpoint that costs more than the provider’s own standard (non-regional) endpoint for the same model and service tier, or more than the cheapest standard endpoint when the provider has no standard one, is a regional-surcharge endpoint, and one priced at parity is treated like any other endpoint. Only endpoints a default request can use count as the standard reference, so a disabled endpoint or one that needs your own key never sets the price. For closed-weight models, where the premium is a fixed multiple of the model’s list price, default routing on the global domain (https://openrouter.ai) skips these regional-surcharge endpoints whenever the model also has a standard-priced endpoint. The model page lists them under Not used in Standard routing. That grouping describes shared routing without your BYOK keys, so an endpoint that only your own key unlocks still appears there. Open-weight models (models with a Hugging Face id) have no single list price, so their regional endpoints are not held out: they stay in default routing and compete on price and performance with every other endpoint for the model, the same way priority service-tier endpoints do. A regional-surcharge endpoint is used when: The request arrives on a regional domain (https://eu.openrouter.ai or https://us.openrouter.ai), where in-region routing applies The request pins that endpoint with its regional slug in provider.only or provider.order, for example amazon-bedrock/eu-west-1. A bare provider slug such as amazon-bedrock does not pin its regional endpoints The request routes through your prioritized BYOK key for a provider whose only endpoints for the model are regional, billing the premium to your own provider account. See BYOK and Regional Endpoints If every endpoint for a model is surcharge-priced, they all stay in default routing. Finding In-Region Models To see which models are available for in-region routing: Call /api/v1/models on a regional domain to get the full list programmatically, or pass a region query parameter (eu or us) on the main domain Browse EU-eligible models or US-eligible models on the models page with the In-Region Routing filter See the live EU model list with per-provider prices on EU in-region routing on Business Enforcing In-Region Routing with Guardrails Sending requests to a regional base URL is a per-request choice. To guarantee that traffic for a key, member, or an entire workspace can only enter OpenRouter through a specific region, restrict the allowed data regions in a guardrail. Each guardrail can specify allowed_data_regions, a list of the OpenRouter domains that requests governed by that guardrail must arrive through: ValueBase URLglobalhttps://openrouter.aieuropehttps://eu.openrouter.aiushttps://us.openrouter.ai A request that arrives through a domain not in the list is rejected with a 403 Forbidden error before any inference or endpoint selection happens, so no prompt is ever processed outside the permitted regions. Leaving the setting unrestricted (null) accepts requests from any domain. Enforcement applies to every OpenRouter API surface, including chat completions, embeddings, rerank, image, audio, and video generation, server tools, the Batch API, and generation lookups. When more than one guardrail governs a request (the workspace default guardrail, the member’s guardrail, and the API key’s guardrail), the effective set of regions is the intersection of every guardrail that sets one, so a lower-level guardrail can only narrow the regions permitted above it. For example, if the workspace default guardrail allows europe and us and an API key guardrail allows only europe, requests with that key must arrive through https://eu.openrouter.ai. To enforce EU residency for a whole workspace, set allowed_data_regions to ["europe"] on the workspace default guardrail. This can be configured in the guardrail editor under Data regions or through the Guardrails API. The guardrail value for the EU is europe, while the Models API region filter takes region=eu. The two are not interchangeable. Data-region guardrails require a Business or Enterprise plan. If your plan stops including in-region routing while a region guardrail is still assigned, the guardrail keeps enforcing its region list, but the regional domains themselves reject requests from accounts without in-region routing. Requests governed by that guardrail are therefore rejected until you upgrade or clear the restriction (any region not in the list stays blocked; global in the list keeps https://openrouter.ai open). What stays outside the region In-region routing covers the prompts and completions in requests sent to a regional domain and served by shared provider endpoints. Account and operational records, BYOK deployments, and destinations you configure are outside that boundary. For eu.openrouter.ai: Processed in Europe (requests to eu.openrouter.ai)May be stored or processed in the USYour responsibilityPrompt and completion processingAccount dataBYOK deployment regionProvider inference, on shared provider endpoints in Europe (the EU/EEA, the UK, and Switzerland)Billing recordsBroadcast and observability destinations you configureOpenRouter’s request handlingAuthentication dataSecurity logsAbuse-monitoring metadataOther operational records OpenRouter supports GDPR programs with a DPA and Standard Contractual Clauses. The DPA includes an EU-only processing addendum (Exhibit A) for API payloads, which applies when you elect it in writing. See the Data Processing Agreement. Features that would process data outside the region are rejected on regional domains; see Feature Availability. For your own resources, see Observability with In-Region Routing and