Getting a free Gemini API key
Two minutes, no card. Where the key is stored, who can use it and what it costs.
Create the key
- Go to aistudio.google.com/apikey and sign in with any Google account.
- Click Create API key. If asked, create a new project or pick one.
- Copy the key (it starts with
AIzaorAQ.). - In the add-on, open Settings, paste it and click Save key.
Where it is stored, and who can use it
Google Sheets runs custom functions without knowing which user triggered them, so a formula can only read settings stored with the spreadsheet. That is where the key lives. Consequences:
- Everyone who can edit the spreadsheet can run AI formulas in it, using your key.
- Collaborators don’t need to set anything up.
- The key is not copied to other spreadsheets; add it to each one you use (or copy a sheet that has it).
- People with view-only access can see results but cannot run new formulas.
If you’d rather not share a key, use Fill column, remove the key under Settings afterwards, and share the values.
Cost
Google’s free tier for Gemini Flash models covers a few thousand requests a day. Cached results never call Gemini. If you enable billing on your project you pay Google directly, a fraction of a cent per cell; the add-on never bills you for AI.
Workspace accounts
Some company or school Workspace accounts block AI Studio. Create the key with a personal Google account; it works regardless of which account uses the spreadsheet.