This page outlines details of what is commonly referred to as "zero data retention" in the Gemini Developer API.
Training restriction
As outlined in the Gemini API Terms of Service, when you use Paid Services, Google does not use your prompts (including associated system instructions, cached content, and files such as images, videos, or documents) or responses to improve our products. Paid Services are defined here.
Customer data retention and achieving zero data retention
Customer data is typically retained for limited periods of time in the following scenarios and conditions. To achieve zero data retention, customers must take specific actions or avoid specific features within each of these areas:
Prompt logging for abuse monitoring: As outlined in the Gemini API Additional Terms of Service, for Paid Services, Google logs prompts and responses for a limited period of time solely for detecting violations of the Prohibited Use Policy. When your request for ZDR for a particular project is approved, all user content (prompts and responses) and identifiable metadata (such as IP addresses and Google Account IDs) are cleared prior to logging. The resulting record is marked as sanitized and contains zero identifiable user data, ensuring parity with Vertex AI Zero Data Retention.
Grounding with Google Search: As outlined in the Gemini API Additional Terms of Service, Google stores prompts, contextual information, and generated output for thirty (30) days for the purposes of creating grounded results and search suggestions. This stored information may be used for debugging and testing of systems that support grounding. There is no way to disable the storage of this information if you use Grounding with Google Search.
Grounding with Google Maps: As outlined in the Gemini API Additional Terms of Service, Google stores prompts, contextual information, and generated output for thirty (30) days for the purposes of creating grounded results. This stored information may only be used for reliability engineering, such as debugging in case of service issues. There is no way to disable the storage of this information if you use Grounding with Google Maps.
Interactions API: The Interactions API manages the active state of a conversation to enable multi-turn turns. By default, the Interactions API enables state storage. To ensure a zero-data footprint, you must explicitly set the
storeparameter tofalsein your API requests to opt out of the default state retention.Live API: This stateful API allows real-time reconnection by storing conversation state. To achieve zero data retention, do not configure SessionResumptionConfig. If a session handle is generated, conversation state (including text, audio, and video) is retained for up to 24 hours.
File API Storage: The File API allows users to upload large assets. Files are stored at-rest until deleted by the user or until they expire. Usage of the File API is independent of ZDR logging; users must manually delete files to ensure a zero-data footprint.
Explicit Context Caching: Users may manually cache large datasets (e.g., long videos or document libraries) using the
cached_contentfield. While the logs of these requests follow ZDR dropping policies, the cached context itself is stored with a user-definedttlorexpire_time. To achieve an absolute zero-data footprint, do not utilize the cached_content feature.Implicit In-Memory Caching: By default, Gemini models cache data in-memory to reduce latency and cost for developers. This data is strictly in RAM (not at-rest), isolated at the project level, and has a 24-hour TTL. This does not violate Zero Data Retention.
What's next
- Learn about Gen AI Prohibited Use Policy.
- Review the Gemini API Additional Terms of Service.
- If you require enterprise-grade, self-serve ZDR controls, see the Vertex AI Zero Data Retention guide.