Skip to content

Google Gemini

Google's Gemini models offer strong multimodal capabilities and competitive pricing.

Setup

  1. Get an API key from aistudio.google.com/apikey
  2. In Alma, go to SettingsProvidersAdd Provider
  3. Select Google as the provider type
  4. Enter your API key
  5. Click Save

Available Models

ModelDescriptionContext Window
gemini-2.0-flash-expLatest experimental model1M
gemini-1.5-proMost capable production model2M
gemini-1.5-flashFast and efficient1M
gemini-1.5-flash-8bSmallest, fastest option1M

Features

Massive Context Window

Gemini models support extremely long context:

  • Up to 2 million tokens for Gemini 1.5 Pro
  • Ideal for analyzing entire codebases or books

Multimodal

Gemini natively supports:

  • Text
  • Images
  • Audio
  • Video
  • Code

Grounding

Gemini can be grounded with Google Search for up-to-date information.

Image Generation

Some Gemini models can generate images directly.

Configuration

Base URL

Leave empty for official Google AI API. Google Cloud Vertex AI uses a different endpoint.

Pricing

Gemini offers generous free tiers and competitive paid pricing. See Google AI pricing.

Troubleshooting

"API Key Invalid"

  • Ensure you're using a Google AI Studio key (not Cloud API key)
  • Check the key at aistudio.google.com

"Model Not Available"

  • Some models are region-restricted
  • Try a different model variant

"Safety Filter Triggered"

  • Gemini has built-in safety filters
  • Rephrase your request