数据保留已成为 AI 基础设施中最被误解的术语之一。在一波 AI 安全头条新闻之后,许多开发团队现在会问一个简单的问题:我的 AI 提供商是否会保留我的数据?诚实的答案取决于你如何发送数据。向推理 API 发送提示词,它会被处理并返回,不会被保留。这种设计称为零数据保留(ZDR)。上传数据集用于批处理任务,它会一直存储到你删除为止。两者都是标准设计,而且在两者中客户都掌握控制权。变化的是谁管理数据生命周期,以及在哪里管理。
Fireworks AI 联合创始人兼 CEO Lin Qiao 提出了一种清晰的思考方式。在 2026 年 11 月 13 日发布于 X 的一篇帖子中,她描述了两种标准 API 设计。每一种都决定了数据生命周期的控制权归属。同样的划分已经塑造了数据处理系统数十年。在本文中,我们将结合公开 API 文档中的示例来梳理这一框架。
TL;DR
框架:两种标准 API 设计:上传、使用、删除,或者发送、计算、返回。
它是什么:ZDR 是一种按端点生效的承诺,即在符合条件的请求之后不持久化所涵盖的提示词和输出。
适用范围:是否符合条件取决于端点、请求标志和账户设置,而不是供应商名称。
存储型功能:批处理、文件和数据集功能会保留数据,直到数据被删除或过期。
结论:优先选择临时端点。如果你上传了数据,删除就是你的责任,所以永远不要假设会自动过期。
什么是 AI 数据保留政策?
AI 数据保留政策定义了平台会从你的请求中存储什么,以及存储多久。OpenAI 的数据控制描述了两个层面。应用状态是某项功能必须保留的数据,例如上传的文件。滥用监控日志是为安全审查而保留的副本。一个平台可能在一个层面上为零,而在另一个层面上不为零。
两种常见的 API 设计是什么?
AI 推理和训练 API 遵循两种生命周期设计。区别在于谁管理数据,以及在哪里管理。
模式 1:客户管理的保留(上传、使用、删除)
你创建一个文件或数据集,对其运行作业,然后将其删除。平台会一直存储并保留这些数据,直到你请求删除。除非你明确界定,否则平台无法知道你何时完成。因此,删除是你的职责,需通过平台的 API 来完成。
上传数据集的批处理 API 是标准示例:
OpenAI Batch:上传一个 JSONL 输入文件,然后创建批处理。
Amazon Bedrock 批处理推理:输入 JSONL 文件存放在你选择的 S3 位置。
Gemini Batch API:作业基于你提供的输入文件运行。
Fireworks AI Batch:创建一个数据集,然后基于它提交作业。
一旦你删除数据,它就消失了。据 Fireworks CEO 称,在收到删除请求后,它不会保留任何内容。
OpenAI 的非批处理文件会一直保留,直到你将其删除。Fireworks AI 托管的训练数据集没有时间限制,由客户自行删除。Amazon Bedrock 和 Google 的批处理作业读写你自己的云存储。
OpenAI 批处理文件默认保留 30 天,Anthropic 批处理数据保留 29 天。把过期视为例外情况,并针对每项功能逐一确认。
模式 2:临时处理(发送、计算、返回)
你发送数据,平台进行计算,结果返回。不留下任何应用状态。你的应用拥有对话历史,因此无需平台清理步骤。这就是 ZDR 适用的模式。仅凭同步响应并不能确立 ZDR。
有文档记载的示例:
OpenAI Chat Completions:store 默认为 false。
Amazon Bedrock Converse:内容仅用于生成响应。
Google Gemini 文本生成:当 store 为 false 时无状态。
Fireworks AI Chat Completions:直接调用或通过 Nexus 调用。其 schema 中没有 store 字段。
Fireworks AI Training SDK,包括 Serverless Training:forward_backward 每次调用发送分词后的批次。不上传数据集,训练数据不会静态存储。
可以把这想象成将电子表格保存到云盘,与把其中的数字传给计算器的区别。云盘会保留文件以备后用。计算器算出答案、返回答案,不保留任何内容。
在两种设计中,客户都完全控制其数据的处理方式。不同之处在于生命周期在哪里管理。在模式 1 中,是显式的数据集创建和删除。在模式 2 中,它完全存在于你的应用程序中。
零数据保留是否覆盖每个端点?
答案是否定的。ZDR 是按端点划分范围的,且默认值因平台而异。
OpenAI 默认将滥用监控日志保留最多 30 天。Amazon Bedrock 的 none 模式不会将任何请求或响应数据写入持久存储。
Fireworks AI 文档说明默认对开放模型提供 ZDR。其临时推理 API、Training SDK 和 Nexus 均带有 ZDR 保证。提示词和生成内容不会持久化存储。对于 Batch API,Fireworks 文档指出删除后不保留任何数据。
单个参数也能翻转该模式。在 Google 的 Interactions API 上,store 默认为 true。在 OpenAI,将 store 设为 false 并不等于 ZDR,后者需要审批。
PlatformSynchronous inference: defaultZero retention optionStored features (pattern 1)OpenAI APIAbuse-monitoring logs are kept for up to 30 days, or longer where law requires. No application state on /v1/chat/completions, with exceptions. Chat Completions store defaults to false.Modified Abuse Monitoring or ZDR, each by prior approval. Under ZDR, store is always treated as false.Batch input files expire after 30 days by default. Batch output and error files expire 30 days after creation. Other files persist until deleted. /v1/files and /v1/batches are not ZDR eligible. Responses API: at least 30 days when store is true.Amazon BedrockThe Converse reference says content is only used to generate the response. The effective retention mode is the first non-inherit value across project, account and model default. New accounts and projects start in inherit. Models that require aws_review are retained for up to 30 days.Set the mode to none. No request or response data is written to durable storage.Batch inference reads and writes S3 locations you specify. Under none, requests to models that require retention are blocked. Model invocation logging to your own S3 or CloudWatch is off by default and customer-enabled.Google Gemini Enterprise Agent PlatformIn-memory and durable caching are on by default for supported Gemini models. Each clears within 24 hours of being written. Abuse-monitoring prompt logging applies to customers on the online Cloud terms. Master Agreement customers are exempt by default, except on designated frontier models.Durable caching can be turned off while in-memory caching stays on. Leave request-response logging and Live API session resumption off. Set Interactions API store to false.Batch inference uses Cloud Storage or BigQuery for input and output. Interactions API store defaults to true. On the separate Gemini API, stored interactions are kept for 55 days on the paid tier and 1 day on the free tier.Anthropic Claude APIStandard policy: API inputs and outputs are deleted within 30 days. Content flagged for Usage Policy violations can be kept for up to 2 years. Covered Models: 30 days required.ZDR by arrangement with sales, per organization. Not offered for Covered Models unless Anthropic expressly authorizes it.Message Batches: retained 29 days. Files API: kept until deleted or expired. Neither is ZDR eligible.Fireworks AIZDR by default for open models. Prompts and generations are not logged or stored without opt-in. They stay in volatile memory for the request. Prompt caches are held in memory only. Request metadata, such as token counts, is logged to run the service. Nexus uses ZDR on every account and plan. Turns it routes to your own Anthropic, OpenAI or Bedrock account follow that provider's policy.Already the default on Chat Completions, the Training SDK and Nexus. Enterprise admins can also enforce an account-wide ZDR policy.Batch API: runs on uploaded datasets. Customers delete datasets through the console or the API. No data is retained after deletion. Managed training: uploaded datasets stay until the customer deletes them.
文档已于 2026 年 11 月 15 日核查。政策会变化,因此请对照链接页面确认。OpenAI 和 AWS 指出,即使启用零保留,被标记为 CSAM 的内容仍可能被保留。
为什么临时处理是更安全的默认选择?
每一份保留的副本都必须受到保护、被追踪,并最终被删除。从未写入磁盘的数据,日后也无法从磁盘中被取走。
监管也指向同一方向,但有一点需要注意。根据 GDPR 第 5 条,临时处理有助于满足存储限制要求。数据最小化仍取决于你的应用发送了什么。
“只要工作流允许,临时处理就更为可取。”——Fireworks AI 联合创始人兼 CEO Lin Qiao(发布于 X)
理由在于人为失误。临时处理不会留下被遗忘的数据集,也不会有遗漏的删除调用。它还意味着需要保护和最终删除的保留副本更少。
存储型功能仍有其用武之地:基于数据集的微调需要静态数据。
开发者现在应该检查什么?
把你调用的每个端点映射到模式 1 或模式 2。
当你只需要结果时,默认使用临时端点。
对每次上传,都要规划删除调用。记录任何有文档说明的过期时间。OpenAI 支持 expires_after。
审查会持久化数据的标志,例如 store。
让密钥远离提示词和数据集。任何混入的密钥都要轮换。
在合同中按处理路径定义 ZDR。然后在你的账户中核实该设置。
要点
ZDR 是端点的属性,而不是供应商的标签。
存储型功能会保留数据,直到数据被删除或过期。
当你只需要结果时,优先选择临时处理。
如果你上传了数据,删除就是你的责任。绝不要假定存在过期时间。
延伸阅读:Lin Qiao 的帖子、OpenAI 数据控制、Amazon Bedrock 数据保留、Google 零数据保留、Anthropic API 数据保留以及 Fireworks AI 零数据保留。
来源:
OpenAI
OpenAI 平台中的数据控制:https://developers.openai.com/api/docs/guides/your-data
Chat Completions 参考(create、store 默认值):https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create
Batch API 指南:https://developers.openai.com/api/docs/guides/batch
Batch API 指南,上传你的批处理输入文件:https://developers.openai.com/api/docs/guides/batch#2-upload-your-batch-input-file
Files API 参考(create、expires_after):https://developers.openai.com/api/reference/typescript/resources/files/methods/create
Amazon Bedrock
数据保留:https://docs.aws.amazon.com/bedrock/latest/userguide/data-retention.html
Converse API 参考:https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
AWS 安全博客,在 Amazon Bedrock 上强制执行零数据保留(2026 年 7 月 7 日,2026 年 8 月 13 日更新):https://aws.amazon.com/blogs/security/enforce-zero-data-retention-on-amazon-bedrock-with-bedrock-projects-and-service-control-policies/
创建批处理推理作业:https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference-create.html
格式化并上传批处理推理数据:https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference-data.html
模型调用日志记录:https://docs.aws.amazon.com/bedrock/latest/userguide/model-invocation-logging.html
Gemini Enterprise Agent Platform 与零数据保留(2026 年 11 月 12 日更新):https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/zero-data-retention
滥用监控:https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/abuse-monitoring
从 Cloud Storage 进行批处理推理:https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/batch-prediction-from-cloud-storage
Gemini API,文本生成:https://aistudio.google.com/docs/text-generation?codelanguage=rest
Gemini API,Batch API 输入文件:https://aistudio.google.com/docs/batch-api#input-file
Gemini API,Interactions API 概览(数据存储与保留):https://ai.google.dev/gemini-api/docs/interactions-overview
Anthropic
API 与数据保留:https://platform.claude.com/docs/en/manage-claude/api-and-data-retention
你们会存储我组织的数据多长时间:https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data
Covered Models 的数据保留实践:https://privacy.claude.com/en/articles/15425996-data-retention-practices-for-covered-models
Fireworks AI
零数据保留(数据处理):https://docs.fireworks.ai/guides/security_compliance/data_handling
零数据保留政策(Enterprise 账户设置):https://docs.fireworks.ai/accounts/zero-data-retention
安全训练:https://docs.fireworks.ai/guides/security_compliance/secure_training
Chat Completions 参考:https://docs.fireworks.ai/api-reference/post-chatcompletions
训练 SDK 参考,forward_backward:https://docs.fireworks.ai/fine-tuning/training-api/reference/service-client#forward_backward-datums-loss_type-loss_fn_config=none
Batch API:https://docs.fireworks.ai/guides/batch-inference#getting-started
Delete Dataset 参考:https://docs.fireworks.ai/api-reference/delete-dataset
Serverless 训练:https://docs.fireworks.ai/fine-tuning/training-api/serverless
提示缓存:https://docs.fireworks.ai/guides/prompt-caching
Nexus,数据安全与隐私:https://docs.fireworks.ai/nexus/data-security
Nexus,API 与 SDK:https://docs.fireworks.ai/nexus/apis-and-sdks
安全公告,2026 年 10 月安全事件更新(训练 SDK:训练数据不静态存储):https://fireworks.ai/security/bulletins/october-2026-security-incident-update
Fireworks 关于数据保留的声明,“数据保留:控制与标准”(2026 年 11 月 13 日):https://x.com/lqiao/article/2121434466082242896
其他
法规 (EU) 2016/679(GDPR):https://eur-lex.europa.eu/eli/reg/2016/679/oj
感谢 Fireworks 团队为本文提供的思想领导力/资源。本文为赞助内容。
文章《Clearing Up the Confusion on AI Data Retention: Two Standard Designs Explained》首发于 MarkTechPost。