How BatchGen Handles Your Gemini API Key
Effective date: June 11, 2026
BatchGen is a bring-your-own-key service: image generation runs through your Google Gemini API key, and Google bills you directly for usage. Because we ask you to paste an API key into our app, you deserve to know exactly what happens to it.
What we never do
- We never store your key on our servers. It is not written to our database, job records, image manifests, logs, analytics, or error reports.
- We never save your key in your browser. It is held in your browser tab's memory only — not in localStorage, sessionStorage, or cookies. Refresh the page or close the tab and the key is gone; you'll paste it again next session. We chose re-pasting over persistence on purpose: it means your key never sits on disk anywhere.
- We never see your Google bill or your other Google data. The key is used only for the validation and generation requests you initiate.
- We never pass your key on the command line. Server-side, the key is handed to the generation process via an environment variable in memory, which keeps it out of process lists.
- Error messages are scrubbed. If Google returns an error, key material is removed before anything is displayed or saved.
How the key flows
1. You paste your key into a password-type field in your browser.
2. When you validate the key or run a generation, your browser sends it to BatchGen over HTTPS.
3. Our server holds it in memory only for the duration of your request and passes it to the generation process via an environment variable.
4. The generation process calls Google's Gemini API with your key.
5. When the request finishes, the key is gone from the server. Saved batch records contain your prompt, settings, and results — never your key.
Your responsibilities
- Create a dedicated Gemini API key for BatchGen rather than reusing one from other projects — that makes rotation painless.
- Set a budget or quota in Google AI Studio / Google Cloud Console so a mistake can't run up an unexpected bill.
- If you ever suspect a key has leaked (from any source), revoke it in your Google console and create a new one. Revocation takes effect at Google immediately.
Cost estimates in the app
Any per-image or per-batch cost figures BatchGen shows are estimates of your Google API usage, based on Google's published pricing. They are not BatchGen charges, and actual billing is determined solely by Google.