Zero Data Retention in AI Routers: Does ZDR Survive Every Hop?
Zero data retention means a provider stores neither your prompt nor the answer. Through a router the promise must hold at every hop. Here is what OpenRouter, OpenCode and Command Code document as of 4 October 2026.

Zero data retention (ZDR) means an AI provider processes your prompt, returns the answer and stores neither afterwards. Through a router the promise has to hold at every hop, meaning the router, the inference provider behind it and the way back. OpenRouter and Command Code let you restrict traffic to ZDR upstreams, OpenCode documents retention model by model, and none of them replaces your own contract. Everything below comes from vendor pages fetched on 4 October 2026, dated where the page shows a date. It is not legal advice, so read the contracts and ask each vendor in writing.
What does zero data retention mean, and how is it different from no training?
Vendors define it in similar words. OpenRouter's ZDR page says a provider "will not store your data for any period of time". Anthropic's data retention page says that under ZDR it "does not store customer prompts or responses at rest after the API response is returned".
No training is a separate promise. OpenRouter says providers that retain nothing cannot train, and adds that some endpoints do not train but still retain data, for example "to scan for abuse or for legal reasons". OpenAI's data controls page says API data has not been used for training since 1 March 2023 unless you opt in, and also says abuse-monitoring logs are kept for up to 30 days by default.
Which exceptions do providers document?
A signed ZDR agreement still has edges. The two direct providers we read list these:
- Anthropic. ZDR is enabled per organization through sales. Flagged content can be kept for up to 2 years. Four models (Claude Fable 5.1, Mythos 5.1, Fable 5 and Mythos 5 on the page today) "require 30-day data retention". Features marked not eligible include Batch (29-day retention), the Files API and code execution (container data up to 30 days). Prompt caching is eligible, with cache data held in memory for its lifetime.
- OpenAI. ZDR needs prior approval and forces the
storeparameter to false. Endpoints such as Files, Batch, Assistants and Vector stores are not eligible. Prompt caching can keep encrypted key/value tensors on GPU-local storage for up to 24 hours.
For routers, one detail matters. Anthropic's page says that on Amazon Bedrock and Google Cloud the cloud provider is the data processor, so Anthropic's ZDR arrangement does not apply there. The same model can sit under different retention terms depending on which host serves it.
Does a ZDR promise survive the router hop?
Not automatically. A ZDR claim can describe the router, the upstream provider or both, and the wording decides which. Check four things.
1. The router's own logging
Ask what the router keeps when every toggle is off. OpenRouter's data collection page says it stores no prompts or responses unless you opt in, but it always stores request metadata such as token counts and latency. Command Code's policy says AI request content is kept for up to 30 days unless ZDR is on.
2. The router's contracts with upstream providers
This is the hop most readers cannot see. OpenRouter says it works with providers to learn each policy, sometimes agrees stricter terms than a provider's default, and assumes an endpoint "both retains and trains on data" when it cannot establish a clear policy. Its privacy policy refers to "our separate agreements with Model Providers" without publishing them, and its terms disclaim any warranty about a model provider's data handling, retention and training.
Your practical lever is a flag that fails closed. OpenRouter's zdr parameter and Command Code's CMD_ZDR both restrict routing to ZDR endpoints and return an error when none exists. OpenCode's pages show per-model retention but no request flag.
3. Bring your own key
With BYOK your own provider contract can cover the upstream leg, but the router stays in the path. OpenRouter says a BYOK key follows the same ZDR rules as credits by default. If your own agreement includes ZDR, you can declare that on the key, and ZDR enforcement then allows requests through it even when the shared endpoint retains prompts. The declaration is yours to make, and the ZDR page does not say OpenRouter verifies it. Command Code's BYOK docs say requests go from your machine straight to the provider, never through Command Code's servers.
4. The response path
Outputs return through the same hops, and caches sit along the way. OpenRouter's optional response caching stores replies at its edge for 1 to 86,400 seconds (default 300). It is unavailable under account-level ZDR, yet the page says a per-request provider.zdr flag does not affect cache eligibility. OpenRouter treats provider-side in-memory prompt caching as not retaining data, and its ZDR enforcement covers inference only, so plugins and tools such as web search sit outside it. The retention pages we read do not discuss streamed output separately.
What do OpenRouter, OpenCode and Command Code document today?
OpenRouter
- Private input and output logging and a 1% discount setting for sharing data are opt-in and off by default. A small sample of prompts is categorised for rankings by a zero-retention model.
- The public ZDR endpoint list returned 942 endpoints from 60 providers on 4 October 2026. For Anthropic models it showed only Google and Amazon Bedrock endpoints, which fits the docs: enforcing ZDR for the Anthropic group removes first-party Anthropic endpoints.
- The terms (31 August 2026) say that if you opt in to "prompt logging" you grant a perpetual, irrevocable licence that includes the right to "license or sell your User Content in anonymized form". The data collection page says OpenRouter has never sold prompt data. The terms do not say which of the two settings they mean, so confirm in writing before enabling either.
OpenCode Zen and Go
- The docs were updated on 3 October 2026. Zen says all its models are hosted in the US and that its providers "follow a zero-retention policy and do not use your data for model training", with listed exceptions. OpenAI and Anthropic requests "are retained for 30 days", free-period models may use data to improve the model, and NVIDIA trial endpoints log use. Zen does not say why. Its list includes Claude Fable 5.1 and 5, two of the four models Anthropic's page says require 30-day retention.
- Go publishes a per-model table. Training is "Not used" for every model except two Muse Spark Contributor models. Retention is 0 days for most, 30 days for Grok 4.7 and 4.6 and the GPT Luna models, and "0 days*" for DeepSeek, whose note says the ZDR agreement "is renewed monthly" and is valid through 31 October 2026. The Grok note says ZDR disables the stateful Responses API, Files and Collections and the Batch API.
- OpenCode's own privacy policy (effective 6 March 2026) lists prompts as passed to the upstream provider and "Not stored".
Command Code
- The privacy policy (20 September 2026) says AI request content, including prompts, files, code snippets and outputs, is kept for up to 30 days "unless you enable zero data retention", and that Command Code does not train foundation models on prompts or source code.
- The ZDR docs describe
CMD_ZDR=1or anx-cmd-zdr: 1header. Requests go only to ZDR-capable upstreams and otherwise fail with a 422cmd_zdr_no_providers. Under ZDR the policy says only operational metadata such as timestamps, token counts and model identifiers is kept. The docs say 99% of models have ZDR-capable upstreams, agreements are renewed monthly and the serving provider can change between requests. - The policy names OpenRouter, Vercel and Cloudflare as gateways that route to model providers. Command Code's Security and Privacy docs page says source code is never stored unless you share it, while the policy says code snippets in AI requests are kept up to 30 days without ZDR. Read together, the two leave open which applies to your prompts, so ask.
Comparison: what each service documents
| OpenRouter | OpenCode Zen and Go | Command Code | |
|---|---|---|---|
| Router-level retention | No prompts or responses stored unless you opt in. Metadata always stored. | Privacy policy: prompts "Not stored". Zen and Go pages do not state it. | Up to 30 days unless ZDR is on. Only operational metadata under ZDR. |
| Training use | Privacy policy: OpenRouter does not train on inputs or outputs. Providers vary by endpoint. | Go: "Not used" except two Muse Spark Contributor models. Zen lists free-period exceptions. | Policy: no training on prompts or source code. Asks providers not to train "where available". |
| ZDR-only upstream option | Yes: zdr per request, account or guardrail. Fails if none. | No request flag documented. Per-model retention table. Admins can disable models. | Yes: CMD_ZDR=1 or header. 422 if none. |
| BYOK | Yes. Same ZDR rules unless you declare ZDR on the key. Still routed via OpenRouter. | Zen: your OpenAI or Anthropic keys, billed by the provider. Path not stated. | Yes. Straight from your machine to the provider. |
| Docs do not say | Which providers hold ZDR agreements with OpenRouter. Contract text. How long abuse or security screening data is kept. | Names of hosts for open models. What request metadata OpenCode keeps. Whether Zen BYOK traffic passes through Zen. | Which gateway serves a ZDR request. How the Security page and the policy reconcile. |
What should you ask a vendor in writing?
- What do you store when every logging toggle is off, for how long, and does metadata include any content or hashes of it?
- Which upstream providers can my requests reach, and can the contract fix that list?
- Do you hold written ZDR agreements with each, covering every feature I use (caching, batch, files, tools), and when do they expire?
- If no ZDR upstream is available, does the request fail or fall back?
- Does abuse monitoring, safety screening or a legal hold retain anything, for how long, and who can read it?
- Which gateways and sub-processors sit between you and the model, where is data processed, and which transfer mechanism covers EU data?
- How do you notify me of policy or sub-processor changes?
Which architecture fits your data?
- Direct ZDR contract with a lab. Fewest parties. Anthropic and OpenAI both require you to apply, and some features fall outside ZDR.
- Router with ZDR-only routing. One contract and many models. It works if the flag fails closed and you accept that the router's upstream agreements are not public.
- Local gateway plus direct contracts. A gateway such as My Claude Code, which we build, runs on your machine and sends traffic only to providers you configure. You hold each contract. It keeps a local request log you control, and an OpenRouter or OpenCode key added inside it brings that service's policy back.
- Self-hosted open-weight models. No third party sees the prompt. You pay in hardware and operations.
See also AI routers vs direct providers and prompt caching explained.
Where Danube Labs fits
Danube Labs is a founder-led software, AI and automation studio in Bucharest. When we design AI features for clients we map the data path first and pick the provider contract, router or local setup to match. For help with that decision see our AI systems service or book a free intro call.
Frequently asked questions
- What is zero data retention in AI?
- Zero data retention (ZDR) means an AI provider processes your prompt, returns the output and does not store either afterwards. Vendors add exceptions, such as abuse monitoring, legal holds and features that need storage, like batch jobs or file uploads. ZDR usually needs a contract or an approved setting, so confirm yours in writing.
- Does OpenRouter store my prompts?
- As of 4 October 2026, OpenRouter's docs say it does not store prompts or responses unless you opt in to private logging or to a 1% discount for sharing data. It always stores request metadata such as token counts and latency. Upstream providers have their own policies, which a ZDR-only routing flag can restrict.
- Is zero data retention the same as no training on my data?
- No. OpenRouter says some endpoints do not train on data but still retain it, for example to scan for abuse or for legal reasons. OpenAI says API data is not used for training unless you opt in, yet keeps abuse-monitoring logs up to 30 days by default. A no-training promise says nothing about how long data is kept.
- Does a ZDR promise still apply when I use an AI router?
- Not automatically. You need ZDR at the router and at the upstream provider, and a router can only enforce what it knows about each endpoint. OpenRouter and Command Code offer flags that route only to ZDR endpoints and fail otherwise, but OpenRouter's terms disclaim warranties about providers' data handling, so ask for the upstream agreements in writing.
- Does bring your own key keep my prompts away from the router?
- Not always. With OpenRouter a BYOK key changes the credential for the upstream request, but the request still goes through OpenRouter, so its policies apply. Command Code's BYOK docs say requests go from your machine straight to the provider. Check how each product handles BYOK before you rely on it.


