Data Retention
Store and access your full request and response data for debugging, analytics, and compliance.
PassingRight offers configurable data retention policies that allow you to store full request and response payloads. This enables powerful debugging capabilities, detailed analytics, and compliance with data governance requirements.
Retention Levels
PassingRight supports two retention levels that can be configured per organization:
| Level | Description | Storage Cost |
|---|---|---|
| Metadata Only | Stores request metadata (timestamps, model, tokens, costs) without full payloads. Default. | Free |
| Retain All Data | Stores complete request and response payloads including messages, tool calls, and attachments. | $0.01/1M tokens |
Metadata-only retention is enabled by default and provides usage analytics without additional storage costs.
Retention levels are configurable on standard (pay-as-you-go) organizations only. DevPass and chat subscriptions are always metadata only — their request and response payloads are not retained, and there is no setting to turn payload storage on. The Responses API exception below still applies to them.
Storage Pricing
When full data retention is enabled, storage is billed at $0.01 per 1 million tokens. This rate applies to:
- Input tokens (prompt)
- Cached input tokens
- Output tokens (completion)
- Reasoning tokens
Storage costs are calculated per request and billed separately from inference. When "Retain All Data" is enabled, each response's usage.cost_details object includes a data_storage_cost field with the per-request storage cost in USD. See Cost Breakdown for the full list of cost fields.
Example Cost Calculation
For a request with:
- 1,000 input tokens
- 500 output tokens
- 1,500 total tokens
Storage cost = 1,500 / 1,000,000 × $0.01 = $0.000015
Configuring Retention
Data retention is configured at the organization level in your dashboard settings. The setting is only available on standard pay-as-you-go organizations:
- Navigate to Organization Settings → Policies
- Select your preferred Data Retention Level
- Save changes
Only organization owners can change the retention level — admins and project admins receive a 403.
Changing retention settings applies to new requests only. Existing stored data follows the retention period active when it was created.
Retention Periods
Data is retained for 30 days for all users, regardless of plan. After the retention period expires, the stored payloads (prompts, completions, tool payloads, raw request and response bodies) are automatically cleared; request metadata used for analytics is kept.
The Responses API does not require data retention. Stored responses (used for
previous_response_id chaining and GET /v1/responses/:id) are kept in
dedicated storage for 30 days — matching OpenAI's own retention — regardless
of your organization's data retention policy, and are not billed as data
storage. Because this is independent of the retention level, it applies to
metadata-only organizations, including DevPass and chat, whose Responses API
input and output items are therefore held for up to 30 days. Send store: false with the request to opt out. When an Enterprise organization's
zero-data-retention policy is active, the gateway
rejects Responses API requests unless store: false is set, does not retain
compaction state, bypasses the gateway response cache, strips provider
prompt-cache markers, and prevents payload retention or project response
caching from being enabled until ZDR is disabled. ZDR cannot be enabled until
both settings are off.
Accessing Stored Data
When data retention is enabled, you can access your stored requests through the dashboard:
- View request history with full payload inspection
- Filter by model and date range
- Inspect complete request and response payloads
Use Cases
Debugging
Full data retention enables you to:
- Inspect exact prompts sent to models
- Review complete responses including tool calls
- Trace conversation histories
- Identify issues in production
Analytics
With stored payloads, you can:
- Analyze prompt patterns and effectiveness
- Track response quality over time
- Build custom dashboards and reports
- Measure model performance across use cases
Compliance
Data retention helps meet compliance requirements by:
- Maintaining audit trails of AI interactions
- Enabling data governance policies
- Supporting incident investigation
- Providing records for regulatory requirements
Billing Considerations
Credit Usage
In API keys mode (using your own provider keys):
- Only storage costs are deducted from PassingRight credits
- Inference costs are billed directly to your provider
In credits mode:
- Both inference and storage costs are deducted from credits
Monitoring Storage Costs
Storage costs appear in:
- Usage dashboard under "Storage" category
- Billing invoices as a separate line item
Enable auto top-up in billing settings to ensure uninterrupted service when storage costs accumulate.
Self-Hosted Deployments
Self-hosted deployments have full control over data retention:
- Enable or disable the 30-day cleanup job with
ENABLE_DATA_RETENTION_CLEANUP=true(disabled by default; the period itself is not configurable) - Data is stored in your own PostgreSQL database
- No additional storage costs (you manage your own infrastructure)
Privacy and Security
- All stored data is encrypted at rest
- Access is restricted to organization members with appropriate permissions
- Stored payloads are automatically cleared after the retention period (on self-hosted deployments, only when the cleanup job is enabled via
ENABLE_DATA_RETENTION_CLEANUP=true) - You can request immediate deletion of specific records through support
How is this guide?
Last updated on