Zero Data Retention on AI Gateway

- AI Gateway 自动路由请求至支持零数据保留(ZDR)的模型提供商,简化合规管理。
- 支持团队级和请求级 ZDR 策略,无需修改代码即可全局或按需启用。
- ZDR 自动包含禁止提示训练功能,并提供路由审计元数据以验证策略执行。
3 min read
Apr 8, 2026
Building with multiple AI models means wrestling with fragmented data policies. With many different model providers, it's not just fragmented, it's just too much time spent on the wrong things.
You have to read through different terms of service, track which providers comply with your security requirements, and hope developers remember to configure opt-outs correctly on every request. What should be a straightforward policy becomes a manual, error-prone process because many providers do not offer Zero Data Retention (ZDR) by default.
AI Gateway changes this by handling the negotiation and enforcement for you. Instead of managing policies provider by provider, you get the freedom to just build. AI Gateway ensures your data requirements are met automatically by only routing to providers where we have negotiated Zero Data Retention agreements. Models from OpenAI, Anthropic, Google, and more have ZDR providers available.
Today, we are expanding AI Gateway's compliance capabilities with team-wide Zero Data Retention (ZDR), letting you enforce strict data policies across your entire team without touching any code. Gateway compliance features now include team-wide ZDR from the dashboard, per-request ZDR for specific sensitive workflows, and explicit controls to disallow prompt training.
Toggle on in the AI Gateway Dashboard Settings, and all subsequent requests via AI Gateway will only route through ZDR-compliant providers.
[Link to heading](http://vercel.com/blog/zdr-on-ai-gateway#team-wide-zero-data-retention)Team-wide Zero Data Retention
Team-wide ZDR is available for Pro and Enterprise teams. It applies to every request your team makes, requiring no code changes. This is ideal for teams that want controls with complete assurance that no one can modify or misapply restrictions.
[Link to heading](http://vercel.com/blog/zdr-on-ai-gateway#request-level-controls)Request-level controls
Per-request ZDR lets you enforce data deletion on specific requests when only certain workflows handle sensitive data. This is useful when your app has proprietary information in certain queries but other requests are not as protected. You can enable request-level ZDR in all API formats supported by AI Gateway in the provider options.
`import type { GatewayProviderOptions } from '@ai-sdk/gateway';import { streamText } from 'ai';const result = streamText({ model: 'anthropic/claude-sonnet-4.6', prompt: 'Analyze this sensitive business data and provide insights.', providerOptions: { gateway: { zeroDataRetention: true, } satisfies GatewayProviderOptions, },});`
Team-wide and per-request settings work together. If either is enabled, ZDR is enforced.
[Link to heading](http://vercel.com/blog/zdr-on-ai-gateway#disallow-prompt-training)Disallow Prompt Training
Disallow Prompt Training prevents providers from using your prompt data to train their models. This is a good default for any team sending proprietary code, internal documents, or business strategy through an LLM. This filter is available on the request-level.
ZDR is a superset of this control. If you enable ZDR, training opt-out is already covered.
`import type { GatewayProviderOptions } from '@ai-sdk/gateway';import { streamText } from 'ai';const result = streamText({ model: 'anthropic/claude-sonnet-4.6', prompt: 'Analyze this proprietary business strategy.', providerOptions: { gateway: { disallowPromptTraining: true, } satisfies GatewayProviderOptions, },});`
Each response includes metadata showing which providers were considered and which were filtered out. This gives you an audit trail of how your data policies were enforced.
`{ "gateway": { "routing": { "planningReasoning": "ZDR requested: 5 attempts → 2 ZDR attempts. ZDR execution order: anthropic(system) → bedrock(system)" } }}`
All of these filters work with the AI SDK, Chat Completions API, Responses API, Anthropic Messages API, and OpenResponses API.
Protecting data no longer requires custom logic in every route. By moving these rules to the gateway, compliance becomes infrastructure instead of application busywork. You get your control back, and your team gets to keep shipping.
For pricing details, see Zero Data Retention pricing. View the models and providers that support Zero Data Retention and Disallow Prompt Training on the model subpages. Enable Zero Data Retention in your dashboard settings today, or read the documentation for full setup details.
问问这篇内容
回答仅基于本篇材料Skill 包
领域模板,一键产出结构化笔记论文精读包
把一篇论文 / 技术博客精读成结构化笔记:问题、方法、实验、批判、延伸阅读。
- · TL;DR(1 段)
- · 研究问题与动机
- · 方法概览
投融资雷达包
把一条融资 / 创投新闻整理成投资人视角的雷达卡:交易要点、判断、竞争格局、风险、尽调清单。
- · 交易要点(公司 / 轮次 / 金额 / 投资人 / 估值,材料未明示则写 “未披露”)
- · 投资 thesis(这家公司为什么值得关注)
- · 竞争格局与替代方案