Repository Public
1<br />23This page outlines details of what is commonly referred to as "zero data retention"4in the Gemini Developer API.56## Training restriction78As outlined in the [Gemini API Terms of Service](https://ai.google.dev/gemini-api/terms), when you9use Paid Services, Google does not use your prompts (including associated system10instructions, cached content, and files such as images, videos, or documents) or11responses to improve our products. Paid Services are defined12[here](https://ai.google.dev/gemini-api/terms#paid-services).1314## Customer data retention and achieving zero data retention1516Customer data is typically retained for limited periods of time in the following17scenarios and conditions. To achieve zero data retention, customers must take18specific actions or avoid specific features within each of these areas:1920- **Prompt logging for abuse monitoring** : As outlined in the [Gemini API21 Additional Terms of Service](https://ai.google.dev/gemini-api/terms), for Paid Services, Google22 logs prompts and responses for a limited period of time solely for detecting23 violations of the [Prohibited Use24 Policy](https://policies.google.com/terms/generative-ai/use-policy). If your25 workload requires guaranteed zero data retention or enterprise data26 processing agreements, use Vertex AI. For details, see27 [Gemini Enterprise Agent Platform and zero data28 retention](https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/zero-data-retention).2930- **Grounding with Google Search** : As outlined in the [Gemini API Additional31 Terms of Service](https://ai.google.dev/gemini-api/terms#grounding-with-google-search), Google32 stores prompts, contextual information, and generated output for thirty (30)33 days for the purposes of creating grounded results and search suggestions.34 This stored information may be used for debugging and testing of systems35 that support grounding. **There is no way to disable the storage of this36 information if you use Grounding with Google Search.**3738- **Grounding with Google Maps** : As outlined in the [Gemini API Additional39 Terms of Service](https://ai.google.dev/gemini-api/terms), Google stores prompts, contextual40 information, and generated output for thirty (30) days for the purposes of41 creating grounded results. This stored information may only be used for42 reliability engineering, such as debugging in case of service issues.43 **There is no way to disable the storage of this information if you use44 Grounding with Google Maps.**4546- **Interactions API** : The Interactions API manages the active state of a47 conversation to enable multi-turn turns. **By default, the Interactions API48 enables state storage** . To ensure a zero-data footprint, you must49 explicitly set the `store` parameter to `false` in your API requests to opt50 out of the default state retention.5152- **Live API** : This stateful API allows real-time reconnection by storing53 conversation state. To achieve zero data retention, **do not configure54 SessionResumptionConfig**. If a session handle is generated, conversation55 state (including text, audio, and video) is retained for up to 24 hours.5657- **File API Storage**: The File API allows users to upload large assets.58 Files are stored at-rest until deleted by the user or until they expire.59 Usage of the File API is independent of ZDR logging; users must manually60 delete files to ensure a zero-data footprint.6162- **Explicit Context Caching** : Users may manually cache large datasets (e.g.,63 long videos or document libraries) using the `cached_content` field. While64 the logs of these requests follow ZDR dropping policies, the cached context65 itself is stored with a user-defined `ttl` or `expire_time`. To achieve an66 absolute zero-data footprint, do not utilize the cached_content feature.6768- **Implicit In-Memory Caching** : By default, Gemini models cache data69 in-memory to reduce latency and cost for developers. This data is strictly70 in RAM (not at-rest), isolated at the project level, and has a 24-hour TTL.71 **This does not violate zero data retention.**7273## What's next7475- Learn about [Gen AI Prohibited Use76 Policy](https://policies.google.com/terms/generative-ai/use-policy).77- Review the [Gemini API Additional Terms of Service](https://ai.google.dev/gemini-api/terms).78- If you require enterprise-grade, self-serve ZDR controls, see the [Gemini Enterprise Agent Platform79 zero data retention80 guide](https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/zero-data-retention).