← Home

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

  1. Go to Google AI Studio.
  2. Sign in with your Google account.
  3. Click Create API Key and select or create a Google Cloud project.
  4. Copy the API key — it starts with AIza...
Free tier: Gemini offers a generous free tier for personal use — check Google's pricing page for current limits. For production use, you may need to enable billing on your Google Cloud project.

Step 2: Configure in OpenClaw

Option A: OpenClaw Launch (Easiest)

  1. Go to openclawlaunch.com and open the configurator.
  2. Select Gemini as your AI model provider and paste your API key.
  3. Choose a Gemini model (e.g., Gemini 2.5 Pro, Gemini 2.5 Flash).
  4. 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

ModelBest ForContext
Gemini 2.5 ProComplex tasks, coding, analysis1M tokens
Gemini 2.5 FlashFast responses, daily chat1M tokens
Gemini 2.0 FlashBudget-friendly, lightweight tasks1M 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 /model command
  • 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.

Deploy a Gemini-Powered Bot

Get a Gemini AI agent running on Telegram or Discord in 30 seconds.

Configure & Deploy