惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
人人都是产品经理
人人都是产品经理
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园_首页
V
Visual Studio Blog
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
博客园 - 【当耐特】
MyScale Blog
MyScale Blog
月光博客
月光博客

OpenRouter Blog

Using OpenRouter With LangChain (ChatOpenRouter) — OpenRouter Blog How to Evaluate LLM Provider Performance — OpenRouter Blog Image Generation API on OpenRouter: Generate + Read Images — OpenRouter Blog Classifiers: Track What Your Agents Do and What It Costs — OpenRouter Blog Transcription on OpenRouter: Whisper & More STT Models — OpenRouter Blog OpenRouter Prompt Caching: What Cached Tokens Cost — OpenRouter Blog One API for Image, Video, Audio, Embeddings & Transcription — OpenRouter Blog A New Look for OpenRouter — OpenRouter Blog Why Use OpenRouter for DeepSeek — OpenRouter Blog Choosing the Optimal Image Input Detail Level in LLMs — OpenRouter Blog DeepSeek V4 Is Earning Agentic Token Share — OpenRouter Blog The Open Weight Models that Matter: June 2026 — OpenRouter Blog The OpenRouter MCP Server — OpenRouter Blog Introducing the Unified Image API — OpenRouter Blog The AI Governance Checklist That Maps to Your Stack — OpenRouter Blog OpenRouter vs Portkey: Routing Network vs Control Plane — OpenRouter Blog OpenRouter vs LiteLLM: Managed vs Self-Hosted Gateway — OpenRouter Blog Connect OpenClaw to OpenRouter: One Key, Failover, Free Models — OpenRouter Blog Connect SillyTavern to OpenRouter: Setup, Models, Fixes — OpenRouter Blog A Robot is Sprinting Towards You: Do You Want it Running on Claude or Grok? Kilo Code + OpenRouter: Setup, Routing, and Free Models — OpenRouter Blog Codex CLI with OpenRouter: config.toml Setup and Models — OpenRouter Blog Claude Code with OpenRouter: Setup, Models, and Costs — OpenRouter Blog How to Use OpenRouter With Any Coding Agent or AI Tool — OpenRouter Blog Subagent: Let Your Model Delegate the Busywork — OpenRouter Blog Free LLM API in 2026: 13 Options Ranked and Compared — OpenRouter Blog How to Enforce Agentic AI Governance at the API Layer — OpenRouter Blog Keep Your Agent Running When Models Disappear — OpenRouter Blog Hermes Agent + OpenRouter: Setup, Model Choice & Routing Config — OpenRouter Blog Lowest-Cost LLM Inference: The Complete OpenRouter Guide — OpenRouter Blog
Enforce AI Data Residency at the Routing Layer — OpenRout...
OpenRouter · 2026-06-22 · via OpenRouter Blog

Deloitte’s State of AI report, which surveyed 3,235 leaders across 24 countries, found that 77% of companies now factor country of origin into their AI vendor selection. Nearly 3 in 5 say they build their AI stacks primarily with local vendors.

If your procurement team has flagged this, the common assumption is that compliance means building or renting local infrastructure. For teams that consume models through an API, it doesn’t. Your requirement is geographic inference routing, and that’s a constraint you can set in a single request.

The infrastructure framing fits governments, defense contractors, and air-gapped environments that need to own the stack. For an application team calling a third-party API, the real question is narrower. Prove that inference on regulated data happens in a specific geography, and that no provider retains or trains on that data.

Treat residency as a routing decision

A routing layer sits between your application and the model providers. Instead of configuring residency separately with each provider, where every one defines it differently, you set geography and data policy once and let the layer pick only providers that qualify.

OpenRouter’s provider object exposes the controls. order and only decide which providers can serve a request, data_collection decides whether a provider may store or train on your data, and zdr requires Zero Data Retention. These work per request, and you can set them as account-wide defaults in your privacy settings.

This shifts your trust from many individual providers to the routing layer. Before you route regulated workloads this way, audit OpenRouter’s own data handling policies and confirm the routing behavior matches your requirements.

Enforce geography in one request

Here’s geographic enforcement in a single call. It tries Anthropic’s direct API first, then Amazon Bedrock, and refuses anything else:

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4.6",
    "messages": [
      {"role": "user", "content": "Summarize this compliance report."}
    ],
    "provider": {
      "order": ["anthropic", "amazon-bedrock"],
      "allow_fallbacks": false,
      "data_collection": "deny",
      "zdr": true
    }
  }'

order sets provider priority. allow_fallbacks at false blocks routing to anything outside the list. data_collection at "deny" excludes providers that store or train on inputs, and zdr at true keeps prompts and completions from being retained after the request. For regulated workloads, set these explicitly rather than relying on defaults.

Each field maps to a different compliance layer. order and only control where inference runs; data_collection and zdr control what happens to the data afterward. They aren’t interchangeable, so set the ones your policy actually requires.

Pin EU jurisdiction when you need it

For EU requirements, you can restrict routing to EU-headquartered providers and deny data collection. Mistral, headquartered in France, is a useful EU-jurisdiction anchor, and you can express the rest through only and the data-policy filters. Independent confirmation of a provider’s data center location should still come from that provider directly.

When requests must never leave the EU, enterprise accounts can use EU in-region routing. Requests are decrypted and processed entirely within the European Union through eu.openrouter.ai, and only EU-eligible providers serve them.

Handle the no-compliant-provider case

If no provider in your list is available and allow_fallbacks is false, the API returns an error rather than routing to a non-compliant provider, which is the behavior you want for regulated data.

Your application chooses what happens next. Queue and retry, fall back to a non-regulated path for content that isn’t sensitive, or surface the failure to the caller. You decide the failure mode, not the router.

Frequently asked questions

Do I need to build local infrastructure for AI data residency?

Not if you consume models through an API. Owning the stack is the right answer for governments and air-gapped environments, but for application teams the requirement is geographic inference routing: prove that inference on regulated data runs in a specific geography and that no provider retains or trains on it. That’s a routing constraint you set per request.

How do I restrict OpenRouter to specific providers or regions?

Use the provider object on a request. order or only controls which providers can serve it, data_collection set to deny blocks providers that store or train on your data, and zdr set to true requires Zero Data Retention endpoints. You can also set these as account-wide defaults in your privacy settings.

What happens if no compliant provider is available?

With allow_fallbacks set to false, OpenRouter returns an error instead of routing to a provider outside your list. Your application decides the failure mode: queue and retry, fall back to a non-regulated path for non-sensitive content, or surface the error.

Can OpenRouter guarantee requests stay in the EU?

For enterprise accounts, EU in-region routing decrypts and processes requests entirely within the European Union through eu.openrouter.ai. For other accounts, you can still restrict routing to EU-headquartered providers and deny data collection, though independent verification of a provider’s data center location should come from that provider.

Does OpenRouter store my prompts?

You control it. Setting zdr to true restricts routing to Zero Data Retention endpoints, and data_collection set to deny blocks providers that store or train on inputs. Review the provider logging docs and your privacy settings before running regulated workloads.