Data Retention
Store and review your complete AI request and response history for debugging and compliance.
Data Retention
osmAPI lets you store full request and response data for every AI interaction. Use it for debugging, compliance auditing, or optimizing your prompts over time.
Why Use Data Retention
Debugging
- Inspect Prompts: See exactly what was sent to the model, including system instructions and context.
- Review Responses: Check complete responses, tool calls, and reasoning chains.
- Fix Issues: Quickly find and fix hallucinations or unexpected outputs in production.
Analytics
- Prompt Optimization: Compare prompt variations against response quality.
- Usage Patterns: Understand how different users interact with your AI features.
- Trend Analysis: Track model performance and cost patterns over time.
Compliance
- Audit Trail: Keep a complete record of all AI interactions for regulatory requirements.
- Security Monitoring: Detect policy violations or misuse in AI payloads.
- Data Governance: Ensure AI usage follows your organization's policies.
Retention Levels
Configure retention at the organization level:
| Level | What's Stored | Additional Cost |
|---|---|---|
| Metadata Only | Request metadata (timestamp, model, latency, cost) — no payload. | Free |
| Full Retention | Complete request and response payloads, messages, and attachments. | ₹0.94 per 1M tokens |
New organizations use Metadata Only by default, giving you usage analytics at no extra cost.
Retention Duration
All users get 30 days of data retention. Data is automatically deleted when the retention period expires.
Storage Pricing
Full Retention costs $0.01 per 1 million tokens. This covers the complete request-response lifecycle:
- Input and reasoning tokens
- Cached tokens
- Output tokens
Storage costs are reflected in your dashboard billing summary.
Setup
- Go to Settings → Data Retention in your dashboard.
- Choose your retention level.
- Upgrade your plan if you need longer retention periods.
Changes apply to new requests only. Existing data follows the retention policy that was active when it was created.
Security
- Encryption at Rest: All stored data is encrypted using industry-standard protocols.
- Access Control: Data access is restricted based on your workspace roles.
- Automatic Cleanup: Data is securely deleted when retention periods expire.
How is this guide?