Skip to content

Google AI

provider: 'google'

The Google AI (Gemini API) provider reaches Gemini models with a plain API key, without a GCP project. Use Vertex AI instead when you need enterprise auth, regional control, or access to Claude/Grok through the same project.

Authentication

Get an API key from Google AI Studio and pass it through extra.apiKey:

ts
{
  provider: 'google',
  model: 'gemini-3-5-flash',
  extra: { apiKey: process.env.GEMINI_API_KEY },
}

Configuration

FieldRequiredDescription
extra.apiKeyRecommendedGoogle AI API key. If omitted, the Google GenAI client falls back to its own environment-variable resolution.

Models

Modelmodel
Gemini 3.5 Flashgemini-3-5-flash
Gemini 3.1 Pro Previewgemini-3-1-pro-preview