Do LLM APIs Train on Your Data? How to Read Retention Policies

Blog / IP & privacy

Do LLM APIs Train on Your Data? How to Read Retention Policies

Whether the data you send to an LLM API is used for training depends on who you connect through and which terms apply. Many vendors treat their API differently from their web app, and the free tier differently from the paid tier. The same vendor also changes its terms over time, so no old news article can answer this for you. What you can do is learn to read the terms and lock down your own side of the data before you integrate.

Most of what a search turns up is news from around 2023 and university course material. It barely covers Chinese vendors, and it rarely discusses the extra hop that a gateway or relay adds. Chinese media have reported a warning from the national security authorities about relay services intercepting data, but without any practical way to check. This article does not include a vendor comparison table (terms change, and tables go stale fast). It covers what to check, where to look, and how to verify.

Why look at training and retention separately?

Many people only ask "will it train on my data?", but the terms contain at least six independent questions:

  1. Training by default: whether API data goes into the training set by default, and whether the free and paid tiers differ.
  2. Opt-out: if data is used by default, whether you can turn that off, and whether turning it off applies to historical data.
  3. Retention period: even without training, requests and responses are often kept for a while for abuse monitoring. Look for a specific number of days, not "a reasonable period".
  4. Human review: whether employees or contractors can see the raw text of requests flagged by safety systems.
  5. Caching and storage features: prompt caching, file uploads, session or thread APIs, and batch jobs all keep data on the server longer, and the retention time often differs from ordinary requests. For how prompt caching writes and expires, see how prompt caching is priced.
  6. Sub-processors: which cloud providers and contractors the vendor uses, whether data leaves the country, and which region it is stored in.

"No training" only answers item 1. An API that doesn't train but keeps data for 30 days and allows human spot checks is not the same risk as one with zero retention.

Which keywords should you search for in official docs?

Open the vendor's privacy policy, terms of service, and API docs, and search for the terms below. It is faster than reading everything from the top:

Question to settleEnglish search termsChinese search terms
Training by defaulttrain, improve our models, model training训练、改进模型、优化服务
Opt-outopt out, data controls, settings退出、关闭、数据设置
Retention periodretain, retention, days, delete保存期限、留存、删除
Human reviewhuman review, trust and safety, flagged人工审核、安全审查
Zero retentionzero data retention, ZDR零留存、不存储
Caching and filescache, files, batch, stored缓存、文件、批量
Sub-processors and regionsub-processor, data residency, region第三方处理者、数据出境、存储地点

A few official entry points (the current content of each page is authoritative):

Chinese vendors (DeepSeek, Zhipu, Kimi (Moonshot AI), Alibaba Cloud Model Studio, Volcengine Ark, and others) usually explain this on their open-platform pages for service agreements, privacy policies, and data security, so search with the Chinese keywords in the table. Be careful to tell the consumer app's privacy policy apart from the developer-facing API agreement. They are often two different documents.

Terms change. cdnping's official changes tracker monitors the changelogs, pricing pages, and news pages of 11 official sources, including DeepSeek, OpenAI, Claude, and Gemini, records additions and deletions line by line, and offers an RSS feed. You can use it to catch policy-related announcements, but the privacy-terms pages themselves are not necessarily in scope, so you still need to recheck them by hand from time to time. For a full approach to tracking official changes, see how to find out right away when an LLM API price changes.

Is ZDR (zero data retention) just a switch?

Not quite. A common pattern is that zero data retention has to be requested separately or requires meeting certain conditions, and it has exceptions. For example, endpoints that need server-side state (files, sessions, batch jobs) may fall outside the zero-retention scope. When reading the terms, confirm three things: which endpoints it covers, how to get it enabled, and which features stop working once it is on.

Here is an example you can observe directly. In cdnping's model monitor, the OpenRouter snapshot from October 17, 2026 lists both xai and xai/zdr endpoints for xAI models, and under the zdr-tagged endpoint there are further variants such as us and priority. In other words, on an aggregator, zero retention may be decided per endpoint, and the same model reached through different endpoints may fall under different data terms. If you depend on zero retention, specify the endpoint explicitly in your calls rather than leaving the choice to the platform's auto-routing. For other effects of switching endpoints, see inference providers and fp8/fp4 model quantization.

What should you check about the extra hop through a gateway or relay?

When you connect directly to the vendor, you read one set of terms. When you go through a cloud-hosted service, an aggregator gateway, or a relay, your data reaches the middle party first and the model vendor second, so there are two sets of terms to read, sometimes more. For the differences between the three ways of connecting, see official API, cloud-hosted, or aggregator gateway: how to choose.

For the middle hop, ask at least these questions:

  • Is the request body written to disk? Does it log only metadata (time, token count, status code), or does it store prompts and responses too?
  • Does it train on the data or resell it? Will the middle party use the data itself, or give it to third parties?
  • How long are logs kept, and who can see them? Can an engineer see the raw text when troubleshooting?
  • Who is upstream? Which vendor and region does the request finally go to, and do the upstream terms allow it to be forwarded this way?
  • Is it officially authorized? Does the middle party say what its relationship with the model vendor is?

Here is an example of how detailed a disclosure can be. AGI Plan (AGI Plan is a commercial partner of cdnping) states on its site that "request bodies are not written to disk by default, and content is not used for training or resold," and also says it is not an officially authorized channel. We think a gateway should put at least these points in writing, rather than offering verbal assurances only in a support chat. We cite it here only to show the level of detail to expect. Before choosing any service, rely on the original text on the provider's own page and check it against the questions above one by one.

For other risks of relay services and how to check them yourself, see is a Claude API relay reliable and how to choose an AI API relay: 8 checks.

The terms look good. How do you verify?

You can't fully verify terms from the outside, but a few things are checkable:

  1. See where the endpoint resolves. Run dig +short <API domain> to get the server IP, then use whois or RDAP to look up that IP's ASN and registration details, which tells you which cloud and region the request lands in first. For how to do the lookup, see what an ASN is and how to look one up.
  2. Look at the response headers. Run curl -sI https://<API domain> to see the headers. Some gateways include an upstream identifier or request ID. This shows whether there is an extra proxy layer, but it cannot prove how your data is handled.
  3. Test with a harmless canary string. In a test environment, send a unique, meaningless string that contains no real information, then watch whether it later shows up in search engines or public datasets. This only catches obvious problems; not finding it does not mean you are safe.
  4. Ask for written documents. In enterprise procurement, you can require a data processing agreement (DPA) and a list of sub-processors. If they can't produce written materials, assume the data will be retained.

Pre-integration data checklist

Whatever the other side's terms say, first lock down what you control on your side:

  • Redact: remove keys, passwords, national ID numbers, phone numbers, customer names, and internal network addresses before sending. You can wrap the SDK with a filter function that uses regexes to catch common formats.
  • Minimal context: give coding tools only the files the current task needs, and use ignore rules to exclude .env, certificates, and database exports.
  • Key isolation: use separate API keys for development, testing, and production; set a quota cap on each key; keep keys out of the repository and inject them through environment variables or a secrets manager. For which configuration level Claude Code environment variables belong in, see the settings.json guide.
  • Check your own logs: see whether your application, reverse proxy, and observability platform write full request bodies to logs. Your side can leak data too.
  • Confirm storage features: if you use prompt caching, file uploads, or batch jobs, look up how long each of them retains data.
  • Record the terms version: when you integrate, archive the other side's terms page with the date, so you can compare later.
  • Classify your data: sort it into "can be sent", "can be sent after redaction", and "must not be sent", and handle the third category only with local models or private deployments.

Using overseas model APIs from within China also brings compliance requirements around cross-border data transfer. Follow each service's terms and local regulations, and when personal information or important data is involved, check with your company's legal or compliance team first. For more on how to read data policies, continue with can your code and conversations be seen when you use a third-party AI API.

Related articles

Keep reading