# Connect a Google Gemini Key Learn how to obtain a Gemini API key from Google AI Studio and configure Automix's language-model settings to use it as your AI provider. _Takes About 10 minutes._ ## Before you start > **You'll need a Google account** > > Any Google account can open AI Studio and create an API key. > > [Open Google AI Studio](https://aistudio.google.com/) > **Read this guide's overview first** > > This guide assumes you already know what the LLM & Providers setting is for. > > [LLM & Provider Settings overview](/docs/platform/guides/llm-and-provider-settings) ## 1. Create a Gemini API key Sign in to Google AI Studio using the Google account you want to be responsible for Gemini usage. Navigate to the API keys section and create a new key. Copy the key immediately after creating it and keep it secret: anyone who obtains it can spend against your Google account. ## 2. Find Gemini's OpenAI-compatible endpoint and model name Google documents an OpenAI-compatible base URL and a list of current Gemini model names in its own API documentation. You should use the base URL and the exact model name currently listed in Google's documentation rather than a value copied from an older guide, since Google updates these values over time. ## 3. Set the provider, key, base URL, and model In the LLM & Providers setting, paste the Gemini API key you created. Set the base URL and model fields to the specific values you found in Google's documentation, as Gemini does not have a built-in preset and these fields must be filled in explicitly. Once you have entered all the details, save the setting to apply the changes. Environment variables: `LLM_PROVIDER`, `LLM_API_KEY`, `LLM_BASE_URL`, `LLM_MODEL` ## After connecting - Automix's assistant and agent features will now send their generation requests to the specific Gemini endpoint and model you configured. - If Gemini returns an error, double-check the base URL and model name against Google's current documentation before assuming the key itself is wrong. ## Next - [LLM & Provider Settings overview](/docs/platform/guides/llm-and-provider-settings) - [Connect an OpenRouter key instead](/docs/platform/guides/openrouter-key) ## Provider links - [Google AI Studio](https://aistudio.google.com/) --- Status: reviewed · reviewed by gemini-3.8-flash Author: qwen3.8-27b