Since October 26, 2026, new paid Gemini API projects save your prompts and responses by default. If you build apps on Gemini and handle customer data, you probably want to know how to switch that off. The short answer is Gemini API store=false: a setting you can apply to a single request or to a whole project.
This guide explains exactly what changed, which projects are affected, how long logs are kept, the SDK versions you need, and copy-paste code for Python and JavaScript. Everything comes from Google's own Gemini API documentation and terms, checked on November 1, 2026. It's written for developers and small teams in the US, UK, Canada, Australia and Germany who need a clear privacy checklist rather than a sales pitch.
QUICK ANSWER
On October 26, 2026 Google made the Generate Content API store requests by default (store=true) for new paid-tier projects. Older projects keep their previous setting, which is off unless you enabled logging in AI Studio. To opt out, pass store=false on each request (Python google-genai 2.33.0+, JavaScript @google/genai 2.31.0+) or turn off Generate Content API logging in the Logs and Datasets settings in Google AI Studio.
What changed on October 26, 2026?
According to the Gemini API changelog, new projects using the Generate Content API (generateContent, streamGenerateContent and batchGenerateContent) on the paid tier now store requests by default (store=true). Google says this matches the Interactions API, which already stored requests by default.
Stored requests appear in the Logs page of Google AI Studio, where you can open an entry and read the full prompt, the response and earlier turns of the conversation. That's genuinely useful for debugging. It also means your project now holds a copy of whatever your users typed.
Which Gemini projects are affected?
| Project | Generate Content API default | Interactions API default |
|---|---|---|
| Created on or after Oct 26, 2026 | Stores requests (store=true) | Stores requests (store=true) |
| Created before Oct 26, 2026 | Not stored (store=false) unless you enabled logging in AI Studio | Stores requests (store=true) |
Google's Logs and datasets guide also notes that log storage is only available for projects on the paid tier, and it covers calls made through the OpenAI compatibility endpoints too. Logging isn't currently supported for Imagen and Veo, Gemini embedding models, the Gemini Robotics model, inputs containing videos, GIFs or PDFs, or Public Preview Agents.
How to set Gemini API store=false on a request
The request-level store property overrides the project setting, so this is the safest option when you want to guarantee a specific call isn't logged. You need these SDK versions or newer:
- Python:
google-genai2.33.0 - JavaScript:
@google/genai2.31.0 - Java:
google-genai1.79.0 - Go:
google.golang.org/genai1.76.0
Python
from google import genai
client = genai.Client()
response = client.models.generate_content(
model="gemini-3.8-flash",
contents="Summarise this support ticket in two lines.",
config={"store": False}, # do not log this request
)
print(response.text)
JavaScript
import { GoogleGenAI } from '@google/genai';
const client = new GoogleGenAI({});
const response = await client.models.generateContent({
model: 'gemini-3.8-flash',
contents: 'Summarise this support ticket in two lines.',
config: { store: false } // do not log this request
});
console.log(response.text);
These follow the examples in Google's docs, with store switched from true to false. Upgrade your SDK first: on older versions the option isn't supported for Generate Content requests.
How to turn off Gemini API logging for a whole project
- Open Google AI Studio and go to the Logs page.
- Pick your project from the drop-down.
- Open the Settings panel of the Logs and Datasets dashboard.
- Toggle logging off for the
generateContentAPI, the Interactions API, or both. Google lets you control them independently.
Project settings can be changed at any time. Remember the order of precedence: a store value sent with a request beats the project default, so a teammate's code that explicitly sets store: true will still log even if the project toggle is off. Search your codebase for it.
How long does Google keep Gemini API logs?
Logs expire and are marked for deletion after a default retention window of 55 days. You can shorten it to 7, 14 or 28 days (55 is the maximum). Logs you save into a dataset don't expire, and datasets can be exported as CSV, JSONL or to Google Sheets, or shared with Google as demonstration examples if you choose to.
One odd detail from the docs: a project needs at least one active API key for logs to be displayed. If you delete every key (for example after a leak), you lose visibility of the project's logs until a key exists again.
store=false vs Google's data-use terms
The store switch controls the logs you see in AI Studio. How Google itself may use your data is set separately by the Gemini API Additional Terms, which describe two cases:
- Paid services (including the paid quota of the Gemini API): Google says it doesn't use your prompts or responses to improve its products. It does log prompts and responses for a limited period solely to detect and prevent violations of its Prohibited Use Policy and for required legal or regulatory disclosures.
- Unpaid services (Google AI Studio and the free quota): Google says it uses submitted content and responses to provide, improve and develop its products and machine learning technologies, and human reviewers may read and annotate inputs and outputs. Google tells users not to submit sensitive, confidential or personal information to unpaid services.
Google's Data logging and sharing policy adds one more detail. Logs in a billing-enabled project aren't used for product improvement by default, but datasets you build from those logs can be contributed to Google for product improvement and model training unless you opt out when you create the dataset, and any thumbs-up, thumbs-down or written feedback you leave on a log is shared too. Datasets also don't expire, unlike logs, which are kept for 7 to 55 days.
So store=false is a good habit, but it's not a substitute for being on the paid tier when you process personal data. If you only need a quick chat rather than an API, our roundup of free AI chats with no login covers the privacy trade-offs of consumer tools.
Should you keep logging on or off?
Keep it on (perhaps with a 7-day window) in development and staging. Being able to read the exact prompt that produced a bad answer saves hours, and datasets help you build evaluation sets.
Turn it off, or send store=false, in production paths that handle health, financial, HR or children's data, or anything your privacy policy promises not to retain. If you're subject to GDPR in the UK or Germany, it's worth recording which setting you chose and why.
For the Interactions API, be careful: Google says storing requests there "also enables server-side state management features", so test your conversation flow before disabling it. Need to estimate what a model switch costs while you're at it? Try our AI token counter and AI API cost calculator, or read our explainer on Gemini 4 Carbon. All our free tools are in the free AI tools hub.
Related: Protecting your API account starts with the login. Try our strong password ideas you can actually remember.
FAQ
Does the Gemini API store my requests by default?
For paid-tier projects created on or after October 26, 2026, yes: the Generate Content API stores requests by default (store=true). Older projects keep their existing setting, which is off unless logging was enabled in AI Studio. The Interactions API stores requests by default.
How do I set store=false in the Gemini API?
Pass store false in the request config, for example config={'store': False} in Python or config: { store: false } in JavaScript. You need google-genai 2.33.0 or later for Python and @google/genai 2.31.0 or later for JavaScript.
How long are Gemini API logs kept?
Logs are kept for 55 days by default. You can change the retention window to 7, 14, 28 or 55 days. Logs saved to a dataset don't expire.
Can I turn off Gemini API logging for a whole project?
Yes. In Google AI Studio, open the Logs page, choose the project and use the Settings panel to toggle logging off for the generateContent API and the Interactions API separately. A store value sent on an individual request still overrides it.
Does store=false stop Google using my data for training?
Not by itself. On paid services Google's terms say prompts and responses aren't used to improve its products, while on unpaid services they may be. store=false controls the logs saved to your project in AI Studio.
Sources and further reading
- Gemini API release notes (October 26, 2026 entry) (Google AI for Developers)
- Logs and datasets (Google AI for Developers)
- Gemini API Additional Terms of Service (Google AI for Developers)
Comments
Post a Comment