> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google AI (Gemini)

> Use Gemini models from Google in your BoostGPT AI teammates

## Overview

Google's Gemini models offer industry-leading context windows (up to 2 million tokens), exceptional multimodal capabilities, and strong performance across text, code, and reasoning tasks.

## Available Models

> [!NOTE]
>
> Gemini 3.8, 3.7 and 3.6 Flash are on Google's introductory pricing until December 31, 2026. Google doubles their
> price from January 1, 2027, and their credits per step follow on that day.

> [card] Gemini 3.8 Flash
>
> **3 credits** • Gemini's newest Flash model, built for long-horizon engineering and autonomous AI teammates.
>
> * 1M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Fast • Cost: Medium
> * Vision: images supported

> [card] Gemini 3.7 Flash
>
> **3 credits** • The newest Gemini Flash model, with a 1M-token context window and native multimodal input.
>
> * 1.05M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Fast • Cost: Medium
> * Vision: images supported
> * Model id: `gemini-3.7-flash`

> [card] Gemini 3.6 Flash
>
> **3 credits** • Balances speed with intelligence for strong performance on agentic and multimodal tasks.
>
> * 1M context window
> * Excellent reasoning (reasoning model)
> * Speed: Fast • Cost: Medium
> * Vision: images supported
> * Model id: `gemini-3.6-flash`

> [card] Gemini 3.5 Flash
>
> **6 credits** • Most intelligent Gemini model for sustained frontier performance on agentic and coding tasks.
>
> * 1M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Fast • Cost: Medium
> * Vision: images supported
> * Model id: `gemini-3.5-flash`

> [card] Gemini 3.5 Flash Lite
>
> **2 credits** • The fastest, most cost-effective Gemini 3.5 model for high-throughput execution.
>
> * 1M context window
> * Good reasoning (reasoning model)
> * Speed: Very\_fast • Cost: Very\_low
> * Vision: images supported
> * Model id: `gemini-3.5-flash-lite`

> [card] Gemini 3.1 Pro
>
> **8 credits** • Reasoning-first Gemini model for complex agentic workflows and coding, with adaptive thinking.
>
> * 1M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Medium • Cost: High
> * Vision: images supported
> * Model id: `gemini-3.1-pro-preview`

> [card] Gemini 2.5 Flash
>
> **2 credits** • A fast and capable model in the Gemini 2.5 series, balancing speed and reasoning performance for production use.
>
> * 1M context window
> * Excellent reasoning (reasoning model)
> * Speed: Fast • Cost: Medium
> * Vision: images supported
> * Model id: `gemini-2.5-flash`

> [card] Gemini 2.5 Flash Lite
>
> **1 credit** • A lightweight, cost-efficient variant of Gemini 2.5 Flash, optimized for low latency and basic tasks.
>
> * 1M context window
> * Good reasoning (reasoning model)
> * Speed: Very\_fast • Cost: Very\_low
> * Vision: images supported
> * Model id: `gemini-2.5-flash-lite`

## Setup

### Using BoostGPT-Hosted API Keys

**1. Select Gemini Model**

In your BoostGPT dashboard, select any Gemini model when creating or configuring your bot.

**2. Choose Your Model**

* **Gemini 2.5 Flash**: Best for most production use cases
* **Gemini 2.5 Pro**: When you need massive 2M context
* **Gemini 2.5 Flash Lite**: High-volume, cost-sensitive
* **Gemini 2.0 Flash Thinking**: Complex reasoning tasks

### Using Your Own Google AI API Key

> [tab] Dashboard Setup
>
> **1. Navigate to Integrations**
>
> Go to [app.boostgpt.co](https://app.boostgpt.co/integrations) and select **Integrations**
>
> **2. Select Google AI**
>
> Find and click on the **Google** provider
>
> **3. Add API Key**
>
> Get your API key from [Google AI Studio](https://makersuite.google.com/app/apikey)
>
> Enter the API key and select which AI teammates will use it
>
> **4. Save Configuration**
>
> Click save to apply your custom API key
>
> > [!TIP]
> >
> > Google AI offers a generous free tier for testing and development!

> [tab] Core SDK
>
> ```javascript bot.js theme={null}
> import { BoostGPT } from 'boostgpt';
>
> const client = new BoostGPT({
>   project_id: process.env.BOOSTGPT_PROJECT_ID,
>   key: process.env.BOOSTGPT_API_KEY
> });
>
> // Create bot with Gemini model
> const botResponse = await client.createBot({
>   name: 'My Gemini Bot',
>   model: 'gemini-2.5-flash',
>   instruction: 'You are a helpful assistant.',
>   max_reply_tokens: 1000,
>   status: 'active'
> });
>
> if (botResponse.err) {
>   console.error('Error:', botResponse.err);
> } else {
>   console.log('Bot created:', botResponse.response);
> }
> ```

> [tab] Router SDK
>
> ```javascript router.js theme={null}
> import { Router, TelegramAdapter } from '@boostgpt/router';
>
> const router = new Router({
>   apiKey: process.env.BOOSTGPT_API_KEY,
>   projectId: process.env.BOOSTGPT_PROJECT_ID,
>   defaultBotId: process.env.BOOSTGPT_BOT_ID, // Gemini bot
>   adapters: [
>     new TelegramAdapter({
>       telegramToken: process.env.TELEGRAM_TOKEN
>     })
>   ]
> });
>
> // Router uses Gemini automatically
> router.onMessage(async (message, context) => {
>   // Custom logic
>   if (message.content === '/info') {
>     return 'Powered by Gemini with 1M context!';
>   }
>
>   return null; // Gemini handles it
> });
>
> await router.start();
> ```

## Model Selection Guide

> [accordion] Gemini 2.5 Flash - Production Workhorse
>
> **Best for:**
>
> * Production chatbots and customer support
> * General-purpose applications
> * Fast responses with strong reasoning
> * 1M context for long conversations
>
> **Sweet spot:** Best balance of speed, cost, and capability
>
> **Cost:** 2 credits per request

> [accordion] Gemini 2.5 Pro - Maximum Context
>
> **Best for:**
>
> * Analyzing entire codebases
> * Processing very long documents (books, research papers)
> * Multi-turn conversations with full history
> * Maximum context retention (2M tokens)
>
> **Standout feature:** Largest context window available
>
> **Cost:** 3 credits per request

> [accordion] Gemini 2.5 Flash Lite - High Volume
>
> **Best for:**
>
> * High-volume applications (thousands of requests)
> * Simple queries and responses
> * Cost-sensitive production
> * Quick classifications
>
> **Cost:** 1 credit per request (most affordable)

> [accordion] Gemini 2.0 Flash Thinking - Reasoning
>
> **Best for:**
>
> * Mathematical problem solving
> * Code analysis and debugging
> * Multi-step logical reasoning
> * Scientific tasks
>
> **Note:** Reasoning model with explicit thinking
>
> **Cost:** 3 credits per request

> [accordion] Gemini 3 Pro Preview - Cutting Edge
>
> **Best for:**
>
> * Research and experimentation
> * Testing next-generation capabilities
> * Maximum context + latest features
>
> **Note:** Preview model, may have breaking changes
>
> **Cost:** 5 credits per request

## Troubleshooting

> [accordion] Slow responses with Pro
>
> **Expected:** Pro prioritizes accuracy over speed
>
> **Solutions:**
>
> * Use Flash for faster responses
> * Reduce input length when possible
> * Add loading indicators

> [accordion] Context length errors
>
> **Rare:** 1M-2M context handles most cases
>
> **Solutions:**
>
> * Use Pro for maximum 2M context
> * Implement message pruning for extreme cases
> * Split very large documents

> [accordion] Higher costs than expected
>
> **Cause:** Long contexts consume many tokens
>
> **Solutions:**
>
> * Use Flash Lite for simple tasks (1 credit)
> * Implement context pruning
> * Set max\_reply\_tokens limits
> * Monitor token usage in dashboard

## Next Steps

> [card] [Model Comparison](/docs/providers/model-comparison.md)
>
> Compare all providers

> [card] [Reasoning Models](/docs/providers/reasoning-models.md)
>
> Learn about Flash Thinking

> [card] [Bring Your Own Key](/docs/providers/bring-your-own-keys.md)
>
> Use your Google AI API key

> [card] [SDK Reference](/docs/sdk/core/api-reference.md)
>
> Full API documentation


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.