Google Gemini
Connect the Google Gemini API to let agents send completions to Gemini models and generate embeddings through the vault.
Prerequisites
- A Google AI Studio account at aistudio.google.com
Getting Your API Key
- Go to aistudio.google.com/apikey
- Click Create API key
- Select or create a Google Cloud project
- Copy the key (starts with
AIza...)
Connecting
- Go to Connections in the dashboard
- Select the LLM Access tab
- Click Connect Google Gemini
- Paste your API key
- Click Connect
Singleton
Gemini is a singleton service -- only one connection per workspace. Agents use service: "gemini" instead of a connection ID.
Vault API Usage
vault_execute({
service: "gemini",
method: "POST",
url: "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent",
body: {
contents: [{ parts: [{ text: "Hello!" }] }]
}
})
The vault automatically adds the x-goog-api-key header.
Available Endpoints
| Method | URL Path | Description |
|---|---|---|
| POST | /v1beta/models/{model}:generateContent | Generate content |
| POST | /v1beta/models/{model}:embedContent | Generate embeddings |
| GET | /v1beta/models | List available models |