# Gemini API key (/docs/providers/gemini-key)

The Gemini API key account answers with a key from Google. The wallet lists it as Gemini under "With an API key", with the id `gemini-key`. A Gemini subscription is a separate account, described on the [Gemini plan](/docs/providers/gemini) page.

## What the visitor needs [#what-the-visitor-needs]

A Gemini API key. Google bills the account that owns the key.

## Connect [#connect]

1. The visitor creates an API key in Google's console, on the account that should pay.
2. In the wallet, the visitor picks Gemini under "With an API key".
3. The visitor pastes the key in the "Gemini API key" field and presses Connect.

The wallet keeps the key in its encrypted vault, without the spaces around it. It makes no test call, and a wrong key shows up as the provider's error on the first answer. The key has no expiry in the wallet and stays in the vault until the visitor removes the account.

## Models [#models]

The wallet lists the models of `https://generativelanguage.googleapis.com/v1beta/openai/models` whose id contains `gemini`, newest first, without the `models/` prefix. The wallet leaves out the ids that name another kind of model: those containing `embed`, `audio`, `realtime`, `transcribe`, `tts`, `image`, `dall`, `whisper`, `moderation`, `search`, `ocr` or `codex`. It keeps the list for a day. The visitor picks the account's default model in its settings, and a model per site with the buttons of the side panel. Without a choice, the account answers with `gemini-3.8-flash`.

## Usage and limits [#usage-and-limits]

The wallet reads `x-ratelimit-remaining-tokens` and `x-ratelimit-limit-tokens` on each answer that carries them. The room left is the remaining tokens divided by the limit. Without these headers, the card keeps saying "Usage shows after the first answer", and Auto ranks the account among the accounts with no reading.

## Calls [#calls]

Answers come from `https://generativelanguage.googleapis.com/v1beta/openai/chat/completions`, Gemini's OpenAI compatible endpoint, with the key as a bearer token. All four request options reach Google.
