
Enable Zero Data Retention on the xAI Console
Turn on Zero Data Retention (ZDR) for an xAI team when compliance requires that API request inputs and outputs never persist to disk. Official Security documents the Console walkthrough for team admins, the features ZDR disables, and the response header that confirms the setting. ZDR is team-wide: every API key on that team inherits it, and there is no per-key toggle. xAI's docs warn that most teams should keep the default 30-day retention because ZDR blocks stateful Responses, Files, Collections, Batch, deferred completions, and xAI-hosted image or video output storage. Only enable it when your requirements truly demand it. Start at console.x.ai as a team admin.
What you need
A team-admin login on the Console for the team you intend to change, and a plan for the features that will stop working under ZDR. Delete existing Files and Collections on that team first — the Console blocks Enable while stored files or collections remain. If your video path still needs Imagine clips, prepare a signed output.upload_url path with Send an Imagine video to your upload URL before you flip the switch. Image results under ZDR must return base64 only. For Grok Build video tools under ZDR, see Configure ZDR video output storage in Grok Build. More API jobs live on the API hub.
Enable ZDR in Team Settings
- Sign in to console.x.ai as a team admin and select the team you want to change in the team picker.
- Delete any existing Files and Collections for that team so Enable is no longer blocked.
- Open Team Settings, find the Zero Data Retention (ZDR) row, and click Enable.
- Review the acknowledgments in the confirmation dialog, including that deleted User Content cannot be recovered, accept the Enterprise Terms and Privacy Policy, then click Enable to confirm.
Once enabled, ZDR applies automatically to all API requests made with that team's API keys — no code changes are required for the retention flag itself. To turn it off later, use the same Zero Data Retention (ZDR) row and choose Disable. If you do not see the ZDR option, you may not be a team admin, self-serve ZDR may not be enabled for your environment yet, or your team may be on a negotiated Enterprise Customer Agreement that governs retention separately — contact sales@x.ai in that case.
Confirm the setting
Check three places after Enable:
- Team Settings: the Zero Data Retention (ZDR) row shows an Active badge.
- Team picker: the Console team picker shows a ZDR badge next to your team name (tooltip: Zero Data Retention).
- Response header: every API response includes
x-zero-data-retentionset to"true"or"false", so your application can confirm the active team programmatically.
Audit logs still record administrative events such as key creation and team changes, but the content of API requests and responses does not appear under ZDR. ZDR also applies when you call the US regional endpoint — see Use the US regional API endpoint.
Pitfalls
Enabling ZDR while Files or Collections still exist leaves Enable blocked until you delete them. Expecting stateful previous_response_id conversations, Batch jobs, or xAI-hosted video URLs to keep working after Enable fails those paths by design. Skipping the header check after a team switch can leave apps talking to the wrong retention mode. Flipping ZDR on a shared team without warning other key holders breaks every workflow that still needs stored outputs.