Skip to main content
Zero data retention (ZDR) means that request inputs, such as the prompt or images, are not stored or logged. Turn it on for a request with the zdr parameter.

What is kept

For a request with zero data retention on: Request metadata is still recorded: for example the operation, the model, the content type, dimensions, and size in bytes of every result image, etc. The response has the same shape as without zdr.

Parameter

In a JSON body zdr is a boolean member. In a multipart/form-data body it is a form field with the value true or false.

Example

This request generates an image with zero data retention. It also sets response_format to b64_json, so the image comes back in the response and is not stored:
With an uploaded file, zdr is a form field:

Endpoints

These endpoints take zdr: Create style doesn’t take zdr: a style stores its reference images so that it can be reused. The endpoints that list, get, or delete styles and User information don’t take it either.

Restrictions

  • Style references. style_references and style_reference_urls can’t be used with zero data retention, because they create a stored style during the request. Such a request is rejected. Pass the style_id of a style you created earlier instead.
  • Account default. When zero data retention is enabled for your account, the restriction above also applies to requests that omit zdr. Send zdr: false to turn zero data retention off for one request.
Every model, response_format, and image_format works with zdr.

Image inputs and results

Send images as files, URLs, or data URLs, and pick the response format.

Limits and sizes

How long result URLs are kept.