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

# Zero Data Retention

> OpenAI-compatible inference through trusted partners, with no retention of your prompts or completions at any stage.

<Info>
  **In one sentence:** Zero Data Retention (ZDR) sends OpenAI-compatible inference to trusted partners. Nobody keeps your prompts, completions, or audio content at any stage of the request.
</Info>

## What ZDR is

ZDR is the standard inference mode of the Prem API. You send a standard OpenAI Chat Completions request. Prem sends the request to a trusted inference partner. The partner sends back the completion. Prem does not keep your content, and the partner does not keep your content.

Use ZDR when you want an OpenAI-compatible endpoint that needs no code changes. A contract makes sure that nobody keeps your content.

## What ZDR is not

ZDR is a different mode from [confidential inference](/how-it-works). The two modes give different guarantees. Read this list before you choose a mode:

* **No client-side encryption.** TLS protects your request in transit. Your content is plaintext at the Prem API Gateway and at the partner.
* **No Trusted Execution Environment (TEE).** ZDR operates on standard compute. The hardware does not isolate the workload.
* **No attestation.** The hardware supplies no signed evidence, and there is nothing for you to examine. `GET /attestation/{type}` is correct only for confidential models.
* **A contract gives the guarantee, not cryptography.** A contract and operational controls stop retention. Mathematics does not stop it.

<Warning>
  Use [confidential inference](/quickstart) for regulated data, personal data, health records, source code, or other sensitive data. See [ZDR compared with confidential inference](/zdr/comparison) for the full decision.
</Warning>

## The trusted-partner model

Prem does not operate the compute for ZDR. Prem sends each request to a partner. Each partner operates inference capacity under a zero-retention agreement.

The agreement tells each partner that it must:

* Keep no prompt, completion, or audio content after it sends back the response
* Write no content to a log, a cache, or persistent storage
* Use no content to train or to evaluate a model
* Let no person read the content, and this rule contains abuse review and quality review

Prem does not name its partners in this documentation. The partners operate in the European Union, Switzerland, and the United Kingdom. The availability is different for each model. Use the `regions` field from `GET /openai/models` to find where a model operates. See [Models & Pricing](/models-and-pricing).

<Note>
  Do you need the partner list, the agreements, or a data processing agreement for a procurement review? Contact us at [support@premai.io](mailto:support@premai.io).
</Note>

## Make your first request

### 1. Get an API key

ZDR uses your standard Prem API key. Open the [dashboard](https://dashboard.prem.io/api-keys). Then create a key. The key must have the `chats.completion` scope.

```bash theme={"system"}
export PREM_API_KEY="your-api-key"
```

You do not need a client KEK. The KEK is necessary only for confidential inference.

### 2. Set the base URL

The ZDR base URL is:

```text theme={"system"}
https://gateway.prem.io/openai
```

<Warning>
  Do not add a `/v1` segment. The Prem API gives ZDR at `/openai`. A base URL that ends with `/v1` returns a 404 error.
</Warning>

### 3. Send a request

<CodeGroup>
  ```python Python theme={"system"}
  import os
  from openai import OpenAI

  client = OpenAI(
      api_key=os.environ["PREM_API_KEY"],
      base_url="https://gateway.prem.io/openai",
  )

  response = client.chat.completions.create(
      model="kimi-k3",
      messages=[{"role": "user", "content": "What can you help me build?"}],
  )

  print(response.choices[0].message.content)
  ```

  ```typescript TypeScript theme={"system"}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: process.env.PREM_API_KEY!,
    baseURL: "https://gateway.prem.io/openai",
  });

  const response = await client.chat.completions.create({
    model: "kimi-k3",
    messages: [{ role: "user", content: "What can you help me build?" }],
  });

  console.log(response.choices[0].message.content);
  ```

  ```bash curl theme={"system"}
  curl https://gateway.prem.io/openai/chat/completions \
    -H "Authorization: Bearer $PREM_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "kimi-k3",
      "messages": [{"role": "user", "content": "What can you help me build?"}]
    }'
  ```
</CodeGroup>

Set `"stream": true` to get a stream of server-sent events. The stream uses the OpenAI format.

<Note>
  The [Prem API TypeScript SDK](/developer-experience) also works with ZDR. Set `enableZdr: true` on `createRvencClient` and point the proxy at `https://gateway.prem.io`. The SDK then returns a plain OpenAI-compatible client for the ZDR endpoint — no client KEK, no attestation, and no local proxy. This gives you one SDK for both confidential inference and ZDR.
</Note>

## Compatibility

The request body and the response body use the OpenAI Chat Completions format. Prem removes the identifiers of the upstream backend from the response. Then Prem sends the response to you.

`GET /openai/models` uses the OpenAI models list format. Your OpenAI client can read the catalog with its standard method:

```python theme={"system"}
for model in client.models.list():
    print(model.id)
```

See [Models & Pricing](/models-and-pricing) for the models, the response fields, the regions, and the mode errors.

## Next steps

<CardGroup cols={2}>
  <Card title="Security boundary" icon="shield-halved" href="/zdr/security-boundary" arrow="true">
    What Prem holds, what the partner holds, and what ZDR does not protect.
  </Card>

  <Card title="Models & Pricing" icon="tags" href="/models-and-pricing" arrow="true">
    The models, the response fields, the regions, and the mode errors.
  </Card>

  <Card title="ZDR compared" icon="scale-balanced" href="/zdr/comparison" arrow="true">
    ZDR, confidential inference, and a typical inference provider.
  </Card>

  <Card title="Chat completions API" icon="comments" href="/api-reference/zdr-chat-completions" arrow="true">
    The full request and response reference.
  </Card>
</CardGroup>
