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 setsresponse_format to b64_json, so the image comes back in the response and is not stored:
zdr is a form field:
Endpoints
These endpoints takezdr:
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_referencesandstyle_reference_urlscan’t be used with zero data retention, because they create a stored style during the request. Such a request is rejected. Pass thestyle_idof 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. Sendzdr: falseto turn zero data retention off for one request.
response_format, and image_format works with zdr.
Related
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.