Claude API Data Retention Policy Explained
Claude API Data Retention Policy Explained
If you're evaluating Claude for a product that touches customer data, the first question your legal or security team will ask is: what happens to the data I send to the API, and how long does Anthropic keep it? The short answer is that Claude API inputs and outputs are not used to train Anthropic's models by default, but they are retained for a limited period for abuse monitoring and trust & safety purposes — typically a short window measured in days, not months — unless you qualify for a zero-retention agreement.
That's the policy in one sentence. The rest of this article walks through what that actually means in practice, how it differs from consumer Claude.ai usage, and what you need to think about when you're building on top of the Claude API — whether you call Anthropic directly or go through a layer like SubToAPI.
Training vs. Retention — Two Different Things
A lot of confusion comes from conflating two separate questions:
- Does Anthropic train on my API data? No, not by default. Business and API customers are opted out of model training on their inputs and outputs unless they explicitly opt in (which is rare and usually only relevant for research partnerships).
- Does Anthropic store my API data at all? Yes, for a limited time. Even if your data isn't used for training, it's still logged briefly so Anthropic can detect abuse, enforce usage policies, and investigate safety incidents.
These two things move independently. You can have zero training exposure but still have short-term storage, and that short-term storage is what people usually mean when they search for "data retention policy."
How Long Is Data Actually Retained?
Anthropic's documented policy (check the current terms on anthropic.com, since retention windows are the part most likely to change) generally works like this:
- Standard API usage: inputs and outputs are retained for a short period — historically around 30 days — primarily for trust & safety review, then deleted.
- Zero Data Retention (ZDR): available to qualifying enterprise customers who sign additional agreements. Under ZDR, Anthropic does not retain inputs/outputs beyond what's needed to process the immediate request.
- Prompt caching and batch processing: these features have their own retention characteristics since cached prompt content needs to persist for the cache to be useful (usually a few minutes), separate from the trust & safety window.
If your compliance requirements are strict (healthcare, finance, EU data residency obligations), you need to go directly to Anthropic's current commercial terms and, if necessary, request a Business Associate Agreement or ZDR addendum. No third-party tool — including SubToAPI — can override Anthropic's underlying retention policy, because the model provider is still Anthropic. Any service sitting in front of the API is an additional layer, not a replacement for the base terms.
What a Gateway Layer Does and Doesn't Change
If you access Claude through an API gateway or wrapper — for cost tracking, team seat management, or simplified key issuance — it's worth being precise about where your data goes:
- The request content itself (your prompts, documents, tool outputs) still flows to Anthropic's API and is subject to Anthropic's retention policy described above.
- The gateway layer may log metadata — timestamps, token counts, request IDs, which API key made the call — for billing and usage dashboards. That's a different, usually much lighter, retention surface.
SubToAPI, for example, turns your Claude access into a standard HTTPS API with sub_live_... application keys, streaming, and per-key usage metadata so a team can see who's calling the model and how much it costs. That metadata (token counts, latency, status codes) is what powers the dashboard — it's not the same thing as storing full conversation transcripts, and it doesn't change what Anthropic itself retains on the model side. If data retention is a hard compliance requirement, read both the model provider's policy and the policy of whatever layer sits in front of it.
A minimal request through a gateway looks like any other HTTPS call:
curl https://api.subtoapi.app/v1/messages \
-H "Authorization: Bearer $SUBTOAPI_KEY" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 512,
"messages": [
{"role": "user", "content": "Summarize this contract clause in plain English."}
]
}'
The body you send is the thing that matters for retention — not the key format or dashboard you used to send it. See /docs/messages for the full request shape.
Practical Checklist for Builders
When retention policy actually matters for your product, work through this list:
- Classify your data. PII, health records, and financial data have different regulatory weight than generic text generation. Know which category your prompts fall into before you worry about retention windows.
- Avoid sending data you don't need to. The cheapest way to reduce retention risk is to not send sensitive fields in the first place — redact, tokenize, or summarize client-side before the API call.
- Ask about ZDR if you're regulated. If you're in healthcare, legal, or finance, zero data retention agreements exist for a reason — pursue one directly with Anthropic rather than assuming a gateway solves it for you.
- Separate transcript storage from metadata storage. Your own application likely logs conversations for support or debugging. That's your retention policy, independent of Anthropic's, and you control it.
- Review terms periodically. Retention windows and training opt-outs are contractual terms, and providers update them. Don't treat a blog post (including this one) as a substitute for the current terms of service.
If you're just getting started and want to see request/response shapes before worrying about compliance paperwork, the /docs/quickstart walks through your first authenticated call end to end, and /pricing covers how Solo, Team, and Scale plans differ if you need multiple seats accessing the same underlying Claude account.
FAQ
Does Claude use my API data to train its models? No. By default, API and commercial usage is excluded from model training. Training only happens if you explicitly opt in, which is uncommon for standard API customers.
How long does Anthropic keep my prompts and responses? Under standard terms, a short window — commonly cited around 30 days — for trust & safety review before deletion. Enterprise customers can negotiate zero data retention agreements that remove this window entirely.
If I use a gateway like SubToAPI, does that change Claude's retention policy? No. The underlying model calls still go to Anthropic and follow Anthropic's retention terms. A gateway only adds its own metadata layer (usage stats, billing data) on top — it doesn't alter how the model provider handles your prompt content.