> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Zero Data Retention (ZDR)

> Route requests exclusively to providers that have signed Zero Data Retention agreements. ZDR ensures your prompts and completions are never stored by the upstream provider.

Zero Data Retention (ZDR) is a routing constraint that limits ARouter to providers that have formally agreed not to store your prompts, completions, or any request data for training, logging, or any other purpose.

## How ZDR Works

When ZDR is enabled for a request, ARouter:

1. Filters the provider pool to only ZDR-compliant endpoints
2. Routes the request to a compliant provider
3. Returns `provider.zdr: true` in the response metadata

If no ZDR-compliant provider is available for the requested model, the request fails with a `404` error.

## Enabling ZDR Per Request

Add `zdr: true` in the `provider` object:

```json theme={null}
{
  "model": "openai/gpt-5.4",
  "messages": [{"role": "user", "content": "Analyze this confidential document..."}],
  "provider": {
    "zdr": true
  }
}
```

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(
        base_url="https://api.arouter.ai/v1",
        api_key="lr_live_xxxx",
    )

    response = client.chat.completions.create(
        model="openai/gpt-5.4",
        messages=[
            {"role": "user", "content": "Analyze this confidential document..."}
        ],
        extra_body={"provider": {"zdr": True}},
    )

    print(response.choices[0].message.content)
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    const response = await client.chat.completions.create({
      model: "openai/gpt-5.4",
      messages: [{ role: "user", content: "Analyze this confidential document..." }],
      // @ts-expect-error ARouter extension
      provider: { zdr: true },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl https://api.arouter.ai/v1/chat/completions \
      -H "Authorization: Bearer lr_live_xxxx" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "openai/gpt-5.4",
        "messages": [{"role": "user", "content": "Analyze this confidential document..."}],
        "provider": {"zdr": true}
      }'
    ```
  </Tab>
</Tabs>

## Account-Wide ZDR

Enforce ZDR for all requests made with an API key via the Dashboard or API:

```bash theme={null}
curl -X PATCH https://api.arouter.ai/api/v1/keys/{key_hash} \
  -H "Authorization: Bearer lr_admin_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"enforce_zdr": true}'
```

With account-wide ZDR, every request using that key automatically routes only to ZDR endpoints.

## ZDR vs Data Collection

| Concept             | Scope                                  | Who controls it          |
| ------------------- | -------------------------------------- | ------------------------ |
| **ZDR**             | Provider-level: no storage by provider | ARouter routing policy   |
| **Data Collection** | ARouter-level: what ARouter stores     | ARouter privacy settings |

ZDR only governs what the **upstream provider** does with your data. ARouter itself always stores usage metadata (tokens, cost, timestamps) regardless of ZDR. See [Data Collection](/en/guides/privacy/data-collection) for what ARouter stores.

## Caching and ZDR

ZDR does not prevent prompt caching. Caching is a performance optimization, not a form of data retention — cached prompts are stored ephemerally for latency reduction and are not accessible to other customers or used for training.

## ZDR Endpoints

Use `GET /api/v1/endpoints/zdr` to list all models and provider endpoints that support ZDR:

```bash theme={null}
curl https://api.arouter.ai/api/v1/endpoints/zdr \
  -H "Authorization: Bearer lr_live_xxxx"
```

```json theme={null}
{
  "endpoints": [
    {
      "model": "openai/gpt-5.4",
      "provider": "OpenAI",
      "zdr": true,
      "context_length": 128000
    },
    {
      "model": "anthropic/claude-sonnet-4.6",
      "provider": "Anthropic",
      "zdr": true,
      "context_length": 200000
    }
  ]
}
```

## Related

* [Provider Routing](/en/provider-routing) — Full `provider` object reference including ZDR enforcement
* [Data Collection](/en/guides/privacy/data-collection) — What ARouter collects and stores
* [Provider Logging](/en/guides/privacy/provider-logging) — How providers handle data retention
* [Guardrails](/en/guides/features/guardrails) — Enforce ZDR at the API key level
