Google Gemini with OpenClaw
Configure Gemini 3.1, Flash, and more — API key
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.
google/gemini-3.1-pro-preview (from 2026.2.21)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 & model routing.
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.
{
"agent": {
"model": "google/gemini-3.1-pro-preview"
}
}
Or use google/gemini-flash for cost-effective background tasks. See Configuration guide for full options.
Gemini Flash works well for automation; enable Google Search grounding only when you need fresh web facts—it adds latency and cost. Pair with cron for scheduled checks.
Google AI keys leak via screenshots and shared repos. Rotate in Google Cloud console, update via openclaw onboard, restart Gateway, then revoke the old key.