Choose a privacy mode per environment
The privacy mode governs how much of each request’s content a log retains. It is applied in the metering worker before anything is persisted — so content a mode excludes is never written to storage in the first place.
Defaults are safe: a
development environment defaults to full (you want to see everything while building), and production defaults to metadata (content is not retained unless you opt in). Override per environment in the dashboard.
A single request may only tighten the resolved mode (via metadata.privacy), never widen it:
What is always kept, and for how long
- The usage record (tokens, cost, status) is kept regardless of mode — it is what metering and billing run on. Privacy governs content, not metrics.
- Image bytes are never logged in any mode — only the prompt, an
[omitted:image]marker, and generation metadata. - Per-environment
log_retention_days(default 30) ages out old logs automatically.
Erase content on request (GDPR-style)
To honor a data-subject deletion request, purge request-log content by request id, end user, or environment through the control plane ().POST /v1/projects/{projectId}/logs/purge takes exactly one selector:
logs.purge) and deliberately never touches usage_records or the billing ledger — those are financial-grade records kept under a separate lawful basis.
Deleting an entire organization
An org deletion is a staged purge with a soft window:- The deleted org is first suspended and recoverable for 7 days — there is no immediate hard-delete path.
- After the window, the purge hard-deletes the org’s operational data (keys, provider credentials, limit/quota/budget policies, model aliases, device attestations, end users, request logs, usage rollups, subscriptions, invoices, members, environments, projects).
- A hard retain-list is kept past the purge under lawful basis:
audit_events(the append-only security log),usage_records(the raw metering ground truth), andbillable_usage(the billing ledger, retained for years). Theorganizationsrow itself is kept as a tombstone, never deleted.
Export an organization’s data
For a data-portability request, an org owner can enqueue a full export bundle (config, logs, usage):GET /v1/orgs/{orgId}/exports/{jobId} for status, and the completed job records the bundle manifest’s object key. Export is owner-only (data.export), so it is out of reach of a management key.
Related
Privacy modes
The four modes and how they are resolved.
Observability: logs & usage
What each mode lets you see in a log.
Tenancy & isolation
How data is isolated per org and environment.
Billing & plans
Why usage records are retained separately.