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

# Connect the Gemini API

> Add a Gemini API key and optionally restrict it to Oximy source IPs.

Oximy connects to the Gemini API with an API key created in Google AI Studio.

## Connect an API key

<Steps>
  <Step title="Create a Gemini API key">
    Open [Google AI Studio](https://aistudio.google.com/app/apikey), select the intended Google Cloud project, and create an API key.
  </Step>

  <Step title="Add the key in Oximy">
    Open **Models → Providers → Add provider**, choose **Google**, paste the key, and optionally give the connection a display name.
  </Step>

  <Step title="Verify the connection">
    Save the connection and run **Check now**. A successful check displays **Working**.
  </Step>
</Steps>

## Optional source-IP restriction

In Google Cloud Console, apply an IP-address application restriction to the key and add every address shown under **Restrict access by IP** in Oximy. Follow the [Gemini API key instructions](https://ai.google.dev/gemini-api/docs/api-key) and the [Oximy source-IP guide](/docs/sidekick/admin/provider-network-access).

If the provider explicitly reports that the originating IP violates the key restriction, Oximy displays **Network blocked**. Add any missing displayed addresses, then run **Check now** again.
