AI Gateway is now available: identity-aware access to any AI provider, eliminate API keys, and tunnel to self-hosted models. Get started

AI GatewayProviders

Google Gemini

Connect Google Gemini as an AI Gateway provider

A Google Gemini provider forwards generateContent requests to Google's Gemini API. Attach it to an AI Gateway resource when you want Gemini CLI (or another client that speaks the Gemini API) to use your org's Gemini key.

See AI Providers if you haven't created a provider before. Field options are in Provider Configuration.

This type is the Gemini Developer API (generativelanguage.googleapis.com). For Vertex AI's generateContent / rawPredict paths, use Vertex AI instead.

Defaults

SettingValue
Upstream URLhttps://generativelanguage.googleapis.com
Auth typex-goog-api-key
CapabilitiesGemini Generate Content

Configure

  1. Sidebar → AI Gateway → Providers → Create.
  2. Set Provider Type to Google Gemini. Name, capabilities, upstream URL, and auth type fill in from the defaults above.
  3. Paste your Gemini API key.
  4. Set Allow and Block lists. * allows every model key; gemini-* is a typical narrower pattern.
  5. Save, then attach the provider to an AI Gateway resource.

Leave the upstream URL as the default unless you are pointing at a compatible Gemini API base URL.

Clients

ClientGuide
Gemini CLISetup guide

Was this page helpful?

⌘I

On this page