Google AI (Gemini)

Module id: google_ai · Kind: provider · Configured by: a Google AI API key — GOOGLE_GEMINI_API_KEY in the environment or a key entered in the admin UI · Provider: google

Google's models under one key: Gemini for chat and vision, Imagen for images, Veo for video, and Gemini-based transcription. Like every cloud provider in Synaplan the key is optional — but Google is a module rather than a plain provider because it has two transports (the API key and Vertex AI) and three accepted variable names, and the Feature Status page tells you which one is in effect.


What it adds

  • Every Google row in the model catalog: Gemini chat and multimodal (chat, pic2text), image generation (text2pic), video generation (text2vid), audio transcription (sound2text).
  • Gemini as a target for model aliases on the Anthropic-compatible gateway — point Claude Code at a Gemini model (Claude Code).
  • Transparent per-model pricing from the catalog, so the Free / Low / Mid / High badge and the Statistics page reflect Google's rates.

Without it

Google models are not offered; other providers work as usual. Nothing else in the platform depends on Google.


How to enable

In the admin UI (recommended)

Operate → AI infrastructure → Models & keys → Google: paste the key. It is tested live, stored encrypted in the database, and active immediately for backend and worker — no restart. The same card is the first-run screen on a fresh install.

Get a key from Google AI Studio.

In the environment

Any of these three names works; the first one set wins:

GOOGLE_GEMINI_API_KEY=AIza…     # preferred name
# GEMINI_API_KEY=AIza…
# GOOGLE_API_KEY=AIza…

Restart backend + worker. The environment key is the bootstrap: a key saved later in the admin UI is stored encrypted and wins over it, and Feature Status reports which one is in effect.

Vertex AI (secondary transport)

GOOGLE_CLOUD_PROJECT_ID=my-project
GOOGLE_VERTEX_ACCESS_TOKEN=ya29…

Vertex is used for the models that require it when these are present. On their own they do not switch the module on — an API key is still what makes Google AI configured.


Check it works

  • Operate → Feature StatusGoogle AI shows Available / Google AI key present, and the details say where the key comes from (source: db for a key saved in the admin UI, env for the environment). No Google AI API key in the environment or admin settings means the module is off.
  • Models & keys → Google card shows the health pill and a Test button.
  • Pick a Gemini model in chat and send a message; the answer's cost badge should show Google's rate.

Configuration reference

Setting Where Meaning
GOOGLE_GEMINI_API_KEY, GEMINI_API_KEY, GOOGLE_API_KEY environment API key; any one of the three.
PROVIDER_KEYS.google BCONFIG (written by the admin UI) The encrypted key entered under Models & keys.
GOOGLE_CLOUD_PROJECT_ID, GOOGLE_VERTEX_ACCESS_TOKEN environment Vertex AI project and OAuth access token; secondary transport.

Which Google models are selectable, default, or repriced is catalog configuration under System Config → AI Models, not part of the module.


Troubleshooting

  • Key saved in the UI but Feature Status says not configured. The status caches for up to five minutes; reload after a moment. If it persists, check the key with the card's Test button.
  • 403 / PERMISSION_DENIED from Google. The key's project has the Generative Language API disabled, or the model is not available in your region. Enable the API in the Google Cloud console for that project.
  • Vertex models fail after an hour. GOOGLE_VERTEX_ACCESS_TOKEN is a short-lived OAuth token, not an API key. Rotate it, or use the API-key transport.

Related