API Data Retention and Training Policies: Anthropic, OpenAI, Google
Compare data retention, training policies, Zero Data Retention (ZDR), and HIPAA readiness across Anthropic, OpenAI, and Google Gemini API.
- Anthropic and OpenAI exclude commercial API inputs and outputs from model training by default, whereas Google requires upgrading to a Paid Tier to prevent prompt data from training Google products.
- Abuse monitoring logs default to 30 days at OpenAI and for Anthropic Covered Models, while Anthropic standard messages discard prompt and output text immediately after processing.
- Zero Data Retention (ZDR) removes abuse logs at OpenAI and Anthropic, but requires enterprise approval and enforces behavioral changes like disabling store parameters or blocking CORS.
- HIPAA compliance imposes strict payload constraints: Anthropic caches structured output JSON schemas separately from message text, barring any PHI within schema definitions.
Model Training Policies: Free Tier Traps and Paid API Commitments
When building production AI integrations, data confidentiality begins with a fundamental question: does the LLM provider use incoming prompts and generated completions to train future foundational models? The three major frontier model providers—Anthropic, OpenAI, and Google—handle training rights differently depending on whether requests flow through paid commercial tiers, free developer playgrounds, or specific account agreements.
For Anthropic, customer prompts and Claude’s outputs are never utilized for model training without express permission from the customer. This safeguard applies to commercial API traffic passing through api.anthropic.com, Claude Platform on AWS, Claude in Microsoft Foundry, and Anthropic-managed Claude deployments on Google Cloud. Outside of explicit agreements, Anthropic limits data collection strictly to technical artifacts necessary for service delivery.
OpenAI established a firm boundary on March 1, 2023: customer content submitted through the OpenAI API is excluded from training or model fine-tuning unless an organization actively opts in to share its traffic. This baseline protection applies uniformly across inference endpoints such as /v1/chat/completions, /v1/responses, /v1/embeddings, and /v1/decisions.
Google operates under a tiered model where privacy guarantees depend directly on billing status. On the Google AI Studio Free Tier, customer data can be reviewed and leveraged to refine Google products. To prevent prompts and responses from being used for product improvement, engineering teams must connect a Cloud Billing account and transition to Paid Tiers by prepaying a minimum of $5. Developers should review rate limits and usage tiers at Anthropic, OpenAI, and Google to evaluate how billing accounts scale across tiers.
Default Data Retention and Abuse Monitoring Logs
Even when customer data is excluded from model retraining, providers maintain intermediate retention pipelines for platform abuse prevention, operational state persistence, and audit logging. Understanding the lifespan of these records is vital for teams operating in regulated sectors.
At Anthropic, conversational text (prompts submitted and outputs returned) is not retained at rest by default once an API call finishes. However, specific architectures alter this footprint. Anthropic designates certain releases as Covered Models—specifically Claude Fable 5, Claude Mythos 5, Claude Fable 5.1, and Claude Mythos 5.1—which demand a mandatory 30-day retention window. When an organization without 30-day retention attempts to invoke Claude Fable 5, the endpoint rejects the call immediately:
{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "In order to access this model, your organization or workspace must have data retention enabled."
}
}
Anthropic also enforces long-term audit tracking for specific governance tools. Records within the Activity Feed persist for 6 years. Similarly, remote session transcripts from Cowork persist for 6 years unless removed earlier by users, and local session transcripts from Claude Code or local Cowork environments persist for 6 years by default unless an organization has configured a finite conversation retention schedule.
OpenAI maintains abuse monitoring logs for up to 30 days across all API features by default. These logs capture prompt content, completion outputs, and automated classifier metadata. Beyond abuse tracking, OpenAI maintains application state across specific resources until explicitly deleted by the user, including /v1/threads, /v1/assistants, /v1/vector_stores, /v1/files, and fine-tuning datasets. Deleted Assistants API objects are expunged from OpenAI servers 30 days after deletion. Other ephemeral lifecycles include audio output state stored for 1 hour, background response polling files kept on disk for roughly 10 minutes, and GPU-local prompt caching tensors discarded after 24 hours.
Google AI Studio ties API execution to Cloud Billing accounts under Prepay or Postpay plans, introduced starting March 23, 2026. Prepay balances expire after 12 months (or 1 year) if unused. Because the Gemini API billing pipeline operates with a latency window of roughly 10 minutes, background batch jobs and agent runs can accumulate usage beyond spending limits before execution halts.
Zero Data Retention: Request Mechanics and Operational Scope
Zero Data Retention (ZDR) allows qualifying commercial enterprises to bypass standard abuse monitoring retention. Under ZDR, the vendor does not write prompts or completions to persistent disk storage once the HTTP response finishes transmitting.
Anthropic provides ZDR upon request through its sales team. ZDR applies at an organization level and covers standard Messages and Token Counting endpoints, along with Claude Code when powered by commercial API keys. When operating under ZDR, cross-origin resource sharing (CORS) is explicitly disabled; frontend web applications must route requests through a secure server-side proxy rather than contacting the API directly from the browser.
ZDR does not extend to the Claude Console playground, Claude Managed Agents (which are stateful resources), consumer subscription plans, or Covered Models. If an organization with ZDR requires access to Covered Models like Claude Fable 5.1 or Claude Mythos 5.1, administrators can configure a 30-day standard data retention override on a dedicated workspace while leaving all other workspaces under ZDR.
OpenAI requires sales approval for Zero Data Retention or Modified Abuse Monitoring. Once provisioned, administrators toggle ZDR at the organization or project level within settings. Enabling ZDR enforces key behavioral changes: on /v1/chat/completions and /v1/responses, the store parameter is overridden to false, even if the calling payload specifies store=true.
{
"model": "gpt-6.1-sol",
"messages": [{"role": "user", "content": "Analyze intake form data."}],
"store": false
}
OpenAI’s ZDR does not eliminate state on inherently stateful endpoints like /v1/files, /v1/vector_stores, or /v1/batches. Additionally, image and file inputs uploaded across /v1/responses, /v1/chat/completions, /v1/images, and /v1/decisions are systematically screened by CSAM classifiers; flagged payloads are retained for manual safety review regardless of ZDR, Modified Abuse Monitoring, or Private Safety Processing (PSP) configurations. OpenAI also offers regional data residency controls, which carry a 10% uplift for models released on or after March 5, 2026.
HIPAA Readiness and Sensitive Data Safeguards
Handling Protected Health Information (PHI) under the Health Insurance Portability and Accountability Act (HIPAA) requires executing a formal Business Associate Agreement (BAA). Both Anthropic and OpenAI support HIPAA compliance, but impose rigid technical limits on payload structures and tool configurations.
Anthropic allows organizations to execute a standard BAA self-serve directly in the Claude Console under privacy settings, or negotiate custom terms via sales. Once activated, HIPAA readiness applies across the entire organization permanently and cannot be reverted by an administrator. The API actively inspects every incoming payload and throws a 400 invalid_request_error if an unsupported capability, such as server-side code execution, is detected:
{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "The requested features are not available for HIPAA-regulated organizations without Zero Data Retention: code_execution."
}
}
When building integrations that use structured outputs across Claude, GPT, and Gemini APIs or tools with strict: true, Anthropic compiles JSON schemas into grammar artifacts that are cached independently from conversational message text. Because cached schemas do not receive PHI safeguards, engineers must never include patient identifiers, personal health details, or sensitive strings inside JSON schema property names, enum definitions, const fields, or regex pattern rules.
At OpenAI, organizations with an executed Business Associate and Healthcare Addendum can process PHI across approved endpoints once provisioned with Private Retention with PSP or Safety Retention. However, tool selection requires caution. Web search with live external connectivity is not HIPAA-eligible and falls outside BAA coverage. To maintain compliance when querying web resources via the Responses API web_search tool, requests must run in offline cache mode with external_web_access: false under a ZDR-enabled project:
{
"type": "web_search",
"external_web_access": false
}
Side-by-Side Retention and Compliance Comparison
Selecting an AI provider for sensitive workloads requires aligning infrastructure capabilities with regulatory boundaries. The following table contrasts standard data retention, zero-retention support, training policies, and health compliance mechanisms across providers documented in the sources.
| Dimension | Anthropic Claude API | OpenAI API | Google Gemini API (AI Studio) |
|---|---|---|---|
| Default Model Training | Never used without express permission | Never used since March 1, 2023 (unless opted in) | Used on Free Tier; excluded on Paid Tiers |
| Standard Abuse Retention | 0 days for messages (30 days for Covered Models) | Up to 30 days in abuse monitoring logs | Tied to Cloud Billing account and project tiers |
| Zero Data Retention (ZDR) | Available via sales; organization-wide | Available via sales; org or project level | Not documented in source |
| ZDR Runtime Behavior | Blocks CORS; excludes Managed Agents and Console | Forces store=false; preserves stateful storage | N/A |
| HIPAA / BAA Availability | Console self-serve standard BAA or custom via sales | Business Associate and Healthcare Addendum | Paid Tier terms of service |
| Key Compliance Restriction | No PHI inside structured output schema definitions | Web search requires external_web_access: false | Minimum $5 prepayment to escape data training |
For engineering teams tracking overall infrastructure spending alongside compliance requirements, models can be mapped across budget categories using the LLM API pricing directory and the interactive LLM API cost calculator.
Implementation Checklist for AI Engineering Teams
Before pushing LLM features handling proprietary or regulated data into staging or production, verify your technical architecture against these operational requirements:
- Upgrade Google AI Studio projects from the Free Tier by linking a Cloud Billing account and adding at least $5 in prepaid credits to prevent prompt text from training Google products.
- Separate HIPAA-regulated workloads into isolated Anthropic organizations, as BAA activation is permanent and rejects requests invoking incompatible features with a 400 error.
- Audit all JSON schemas submitted to Anthropic structured output endpoints to guarantee zero PHI appears within keys, enum choices, const values, or regex patterns.
- Ensure OpenAI API requests to
/v1/responsesthat useweb_searchsetexternal_web_access: falsewithin ZDR projects if operating under a Healthcare Addendum. - Route browser-initiated Claude API calls through an intermediate server-side proxy, since Anthropic disables CORS for organizations with active ZDR arrangements.
- Isolate calls to Anthropic Covered Models—such as Claude Fable 5, Claude Mythos 5, Claude Fable 5.1, or Claude Mythos 5.1—inside dedicated workspaces with 30-day retention enabled.
- Monitor prompt caching configurations: OpenAI prompt cache tensors expire after 24 hours in local GPU storage, while setting prompt_cache_retention to in_memory on gpt-5.5 or gpt-5.5-pro returns an error.
To dive deeper into prompt-level optimization while keeping retention parameters in check, review our practical guide on prompt caching explained for Claude, GPT, and Gemini.