The Google Gemini integration connects ThunderAI to Google's Gemini AI models via the Gemini API.
It includes support for advanced options like System Instruction and Thinking Budget, useful for power users who want more control over the model's behavior.

API key requiredFree optionBest for
YesYes (generous free tier available)Users who prefer Google's ecosystem, or want a free API option

Prerequisites

  • A Google account
  • A Gemini API key (free tier available)
  • Thunderbird with ThunderAI installed

Getting an API key

  1. Go to aistudio.google.com/apikey
  2. Click Create API key
  3. Select an existing Google Cloud project or create a new one
  4. Copy the generated API key

The Gemini API has a free tier with generous rate limits, suitable for personal email use. Paid tiers are available if you need higher throughput.

Setup

The quickest way is the Setup Wizard: open it from the ThunderAI welcome page, the toolbar popup or the settings page, choose Google Gemini API, paste your API key, choose a model and test the connection. The wizard then lets you turn on the AI features you want.
To set it up by hand, follow the steps below.

1. Open the ThunderAI settings

In Thunderbird, go to Tools → Add-ons and Themes → ThunderAI → Preferences.

2. Select the Google Gemini integration

In the Connection Settings panel, choose Google Gemini API in the Connection Type dropdown.

3. Enter your API key

Paste your API key in the API Key field. The key is stored locally in Thunderbird and never sent anywhere other than Google's servers.

4. Choose a model

Click Update list next to Google Gemini API Models, then select the model you want to use from the list.

5. Test the connection

Settings are saved as soon as you change them: there is no Save button.
Click Test now in the bar below the connection settings. If Thunderbird asks for permission to access generativelanguage.googleapis.com, accept it. When everything is fine, the bar shows "Connected — Google Gemini API reachable". Then open any email, click the ThunderAI toolbar button and run a prompt.

Advanced options

Click Advanced options in the Connection Settings panel to show the settings below. Leave a field empty to let the model use its default.

  • System Instruction: a persistent context for all your prompts, for example to always answer formally, in a specific language, or in a certain role.
  • Thinking Budget: how many tokens the model can use to reason before answering. Enter 0 to turn thinking off, or -1 for dynamic thinking. Leave it empty if the model does not support thinking.
  • Temperature (0.0–2.0), Top P and Top K: how random or focused the answer is. Not every model supports Top K.
  • Max output tokens: the maximum length of the answer. Empty or 0 lets the model decide.
  • Extra body data: additional parameters for the Gemini API, as a JSON object, for options ThunderAI does not show, e.g. {"generationConfig": {"seed": 42}}. The keys inside generationConfig are merged into the ones built by ThunderAI.

You can also set these options on a single prompt, in the custom prompts page, and on each AI feature (Add Tags, Spam Filter, Summarize, Translate, Calendar Event, Task), with the Advanced options button of its specific connection.

Tips

  • The free tier has per-minute and per-day request limits, generally enough for personal use. Check the current limits in Google AI Studio.
  • If the limit is reached while ThunderAI processes several emails (Add Tags, Spam Filter, Summarize, Translate), the processing stops by itself and tells you how many messages were processed and, when Google says so, how long to wait.
  • The System Instruction is particularly useful if you need to specify general rules for your email assistant.

Troubleshooting

"Authentication failed — check your API key" or "API key not valid" error

Verify the key was copied correctly. Regenerate a new key from AI Studio if needed.

"Model not found" or empty model list

Ensure your API key has access to Gemini models. Some keys created in restricted Google Cloud projects may have limited model access.

Requests fail after changing the advanced options

Some models do not accept every option (for example Top K, or a Thinking Budget on a model without thinking). Empty the option and try again.