# Data retention (https://inference.net/docs/data-retention)

Inference.net is built to support production workloads without treating
request data casually.

## Core principles

- Request data is not used for model training by default.
- Secrets and similar sensitive values are stripped where possible.
- Platform data is encrypted in transit and at rest.
- Retention should match the operational need of the workflow.

## Observability data retention

Traces, spans, and sessions captured by Inference Tracing are retained and
viewable for **30 days**. Trace, span, and session views — in the dashboard and
through the CLI — show at most the last 30 days of history. Older trace history
is not available.

This 30-day window applies only to OpenTelemetry observability data (traces,
spans, and sessions). It is independent of inference request and response
retention and the [Zero Data Retention](#zero-data-retention) controls below.

## Zero Data Retention

New teams start with the **Zero Data Retention (ZDR)** setting on, so
Inference.net does not retain request and response content. With ZDR on,
message contents, tool and function schemas, custom metadata, and error details
are purged after processing; model, usage, and timing metadata are retained.

Change the setting in your team's settings: in the [dashboard](/dashboard/),
open **Settings → General** for the team.
Turn it off to keep inference results or to use the Batch API.
See the [Zero Data Retention Policy](/zero-data-retention/)
for what ZDR covers.

## Asynchronous results are kept until delivery finishes

For every team, ZDR on or off, the request and response content of a finished
[asynchronous](/docs/api/async/overview/) request is kept only until it is
delivered, and is then deleted:

- A `/v1/slow` request with a webhook: deleted after its `generation.completed`
  or `async-embedding.completed` event is delivered (`2xx`), dropped after its
  last retry, or not delivered because the webhook is disabled or deleted or
  its URL is not allowed.
- A `/v1/slow` request without a webhook: deleted soon after the request
  finishes. Fetch the result from `GET /v1/generation/{id}` as soon as its
  state is final, or use a webhook.
- A [group](/docs/api/async/group/): deleted, with the group's input, after its
  `slow-group.completed` event is delivered, dropped, or not delivered. A group
  without a webhook is deleted soon after it finishes.
- A [batch](/docs/api/async/batch/): each request's content is deleted soon
  after the batch finishes. The batch's output and error files are kept until
  they expire.
- A request in a group or batch that has its own `metadata.webhook_id` is also
  kept until that event is delivered, dropped, or not delivered.
- If delivery is never recorded, the content is deleted about 5 days after the
  request finishes.

After the content is deleted, `GET /v1/generation/{id}` and
`GET /v1/slow/group/{groupId}/generations` still return each generation's
state, model, usage, and timestamps, with `request` and `response` set to
`null`. A deleted result cannot be fetched again.

## Retention and asynchronous inference

With ZDR on, [asynchronous](/docs/api/async/overview/) (`/v1/slow`) requests
need a [webhook](/docs/api/async/webhooks/), and the result is delivered only to
that webhook:

1. Set `metadata.webhook_id` to a webhook identifier from
   [**Settings → Webhooks**](/dashboard/settings/webhooks/). A `/v1/slow`
   request without one, or with a disabled webhook, returns
   `400 Bad Request`.
2. The request and response content is held only until webhook delivery
   finishes.
3. The content is purged when delivery succeeds, when its retries run out (24
   attempts, about 3 days), or when the webhook can no longer be delivered
   (deleted, disabled, or its URL is not allowed). Message contents, tool and
   function schemas, custom metadata, and error details are replaced with
   `[purged]`. Model, usage, and timing metadata are kept.
4. After the purge, `GET /v1/generation/{id}` returns the generation with its
   request and response content purged. If you miss the webhook, the result is
   gone and cannot be fetched again.

If webhook delivery never finishes for any reason, the content is purged within
about 5 days of the request. The content is purged if ZDR is on either when the
request is submitted or when webhook delivery finishes.

[Batch](/docs/api/async/batch/) (`/v1/batches`) and file upload (`/v1/files`)
requests return `403 Forbidden` while ZDR is on. Send requests individually to
the synchronous `/v1` endpoints, to `/v1/slow` with a webhook, or as a
[group](#retention-and-groups) with a webhook, or turn ZDR off under
**Settings → General** for your team in the [dashboard](/dashboard/).

## Retention and groups

With ZDR on, [group](/docs/api/async/group/) (`/v1/slow/group/*`) requests are accepted, and the results are delivered only to a webhook:

1. Set the group's `webhook_id` to a webhook identifier from [**Settings → Webhooks**](/dashboard/settings/webhooks/). A group without one, or with a disabled webhook, returns `400 Bad Request`.
2. The results are delivered only in the group's `slow-group.completed` [webhook](/docs/api/async/webhooks/) event. A request's own `metadata.webhook_id` is ignored in a ZDR group, so no `generation.completed` event is sent for it.
3. After the event is delivered (your endpoint answers `2xx`), the requests, the responses, and the group's input are purged. `GET /v1/slow/group/{groupId}/generations` then returns the generations with their request and response content replaced with `[purged]`.
4. A failed delivery is retried for about 68 hours (24 attempts). If no attempt succeeds, the content is purged anyway and cannot be recovered.
5. If the webhook is disabled or deleted, or its URL is not allowed, the content is purged without delivery.

Which groups are covered:

- A group submitted while ZDR is on is purged as above, even if ZDR is turned off before it finishes.
- A group submitted while the team retained results is not purged as a group. It runs to completion if ZDR is turned on while it runs. Each request that finishes after the switch has its request content purged at once. The rest of its content is deleted after the group's event is delivered, like any [asynchronous result](/docs/data-retention/#asynchronous-results-are-kept-until-delivery-finishes).

<Callout tone="warning">

Do not disable, delete, or change the URL of a group's webhook while the group is in flight. The `slow-group.completed` event is sent to the webhook as it is at delivery time: a disabled or deleted webhook purges the results without delivery, and a changed URL receives them.

</Callout>

## Ad-supported models

Ad-supported models (for example `moonshotai/kimi-k3.1-pro-with-ads`) can include
sponsored content from our advertising partner, Gravity. When you call an
ad-supported model, Inference.net sends Gravity, for a sample of requests:

- the full request: chat messages (images included) and parameters such as
  tools and temperature;
- the full response the model generated, including any reasoning and tool
  calls;
- a SHA-256 hash of the user's email address (never the address itself);
- the IP address the request came from;
- the end-user id you send in the request's `safety_identifier` or `user`
  field, if any;
- the conversation id you send in the `x-session-id` header or the request's
  `session_id` field, if any;
- the request's token usage, finish reason and cost (the amount billed, the
  list price, and the difference).

This happens whether or not ZDR is on for your team: it is a term of using an
ad-supported model. To keep all request content under ZDR, call the standard
model instead. Ad-supported models also have
[spend limits](/docs/rate-limits/#ad-supported-model-spend-limits).

## Need a specific retention policy?

If you need a specific policy, a data processing agreement, or help mapping
Inference.net into your internal compliance requirements,
[contact our team](/sales/?topic=security).