Google Gemini with OpenClaw

Configure Gemini 3.1, Flash, and more — API key

Google's Gemini models are supported in OpenClaw. Gemini 3.1 Pro (google/gemini-3.1-pro-preview) was added in OpenClaw 2026.2.21. Gemini Flash is cost-effective for heartbeats, cron jobs, and background tasks—many users run tiered routing with Claude or GPT for main chat and Gemini Flash for scheduled checks.

Models

  • Gemini 3.1 Progoogle/gemini-3.1-pro-preview (from 2026.2.21)
  • Gemini Flash — Fast, inexpensive, good for heartbeats and background work
  • Other Gemini variants — Check OpenClaw and Google AI docs for latest model IDs

Use Gemini Flash for tiered routing: reserve a stronger model for main chat; use Flash for "wake up and check" automation. See Automation for cron and heartbeats, and Example Setups & Cost.

Authentication

Configure an API key from Google AI Studio (aistudio.google.com) or the Vertex AI console. Store in ~/.openclaw/credentials or via openclaw secrets. OAuth/subscription is not typically used for Gemini with OpenClaw.

Basic Configuration

Minimal config
{
  "agent": {
    "model": "google/gemini-3.1-pro-preview"
  }
}

Or use google/gemini-flash for cost-effective background tasks. See Configuration guide for full options.

Why Gemini for OpenClaw

  • Cost-effective — Flash is cheap for heartbeats and cron
  • Tiered routing — Pair with Claude/GPT for main chat
  • Google ecosystem — Integrates with Google AI Studio
  • Fast iteration — New models added regularly