> ## Documentation Index
> Fetch the complete documentation index at: https://backstage.spotify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Generative AI

> Configure Google Gemini models in AI Gateway for language generation, embeddings, and multi-modal AI capabilities.

## Overview

Google Generative AI provides access to Google's powerful Gemini family of models through the Google AI Studio API. These models offer advanced language understanding, multi-modal capabilities, and high-quality text generation.

## Configuration

To use Google Generative AI, configure it in the Plugin settings page under the `AI Gateway` section:

| Field        | Description                                    | Example                                           |
| ------------ | ---------------------------------------------- | ------------------------------------------------- |
| **API Key**  | Your Google API key                            | `your-google-api-key`                             |
| **Base URL** | Optional, to point at a gateway                | `https://ai-gateway.example.com/google`           |
| **Headers**  | Optional, e.g. for authentication with gateway | Key: `X-Custom-Header`<br />Value: `custom-value` |

Then set the default language model (or configure it per-plugin):

```
Language Model: google|gemini-2.5-flash
```

### Supported Models

**Language Models:**

* gemini-2.5-pro
* gemini-2.5-flash (recommended)
* gemini-2.5-flash-lite
* gemini-2.0-flash
* gemini-1.5-pro
* gemini-1.5-flash
* gemini-1.5-flash-8b
* gemma-3-27b-it

**Embedding Models:**

* gemini-embedding-001
* text-embedding-004

A full list of available models can be found in the [Google Generative AI documentation](https://ai.google.dev/gemini-api/docs/models/).

## Getting an API Key

To obtain a Google Generative AI API key:

1. Visit [Google AI Studio](https://aistudio.google.com/)
2. Sign in with your Google account
3. Click on "Get API Key" in the left sidebar
4. Create a new API key or use an existing one
5. Copy the API key and add it to your configuration

## Notes

* Google Generative AI does not currently support re-ranking models
