Guide
How to Use Google Gemini with OpenClaw
Power your OpenClaw AI agent with Google Gemini. Get an API key, configure the model, and deploy a Gemini-powered bot on Telegram or Discord.
Why Use Gemini with OpenClaw?
Google Gemini is one of the most capable AI model families available. It offers strong reasoning, multilingual support, large context windows (up to 1M tokens), and competitive pricing. Combined with OpenClaw's 5,700+ skills, you get a powerful AI agent that can browse the web, write code, manage files, and more.
Step 1: Get a Gemini API Key
- Go to Google AI Studio.
- Sign in with your Google account.
- Click Create API Key and select or create a Google Cloud project.
- Copy the API key — it starts with
AIza...
Step 2: Configure in OpenClaw
Option A: OpenClaw Launch (Easiest)
- Go to openclawlaunch.com and open the configurator.
- Select Gemini as your AI model provider and paste your API key.
- Choose a Gemini model (e.g., Gemini 2.5 Pro, Gemini 2.5 Flash).
- Select your chat platform (Telegram, Discord, or Web), paste the bot token, and click Deploy.
Option B: Self-Hosted Config
If self-hosting OpenClaw, add the Gemini provider to your openclaw.json:
{
"models": {
"providers": {
"google": {
"apiKey": "AIza..."
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "google/gemini-2.5-pro"
}
}
}
}You can also route through OpenRouter for unified billing across multiple providers.
Step 3: Choose a Gemini Model
| Model | Best For | Context |
|---|---|---|
| Gemini 2.5 Pro | Complex tasks, coding, analysis | 1M tokens |
| Gemini 2.5 Flash | Fast responses, daily chat | 1M tokens |
| Gemini 2.0 Flash | Budget-friendly, lightweight tasks | 1M tokens |
For most users, Gemini 2.5 Flash is the best balance of speed, capability, and cost. Use Gemini 2.5 Pro for complex reasoning and coding tasks.
Step 4: Start Chatting
Once deployed, your Gemini-powered OpenClaw agent is ready. You can:
- Chat in natural language on Telegram, Discord, or the web gateway
- Switch between Gemini models with the
/modelcommand - Use 5,700+ ClawHub skills alongside Gemini's intelligence
- Process long documents with Gemini's 1M token context window
Gemini vs Other Models
Not sure if Gemini is right for you? OpenClaw supports all major AI providers:
- Claude — Best for writing and nuanced conversation
- GPT — Strong all-rounder with wide knowledge
- Gemini — Largest context window, strong multilingual
- DeepSeek — Best value for technical tasks
You can switch models anytime without redeploying. See our Models page for a full comparison.