Skip to content

Google Gemini

Overview

Google Gemini is a family of multimodal AI models built by Google DeepMind. Floopy automatically translates OpenAI-format requests to Google’s generateContent API, so you can use Gemini models with the same code you use for any other provider.

Supported Models

ModelContext WindowNotes
gemini-2.5-pro1MMost capable Gemini model
gemini-2.5-flash1MFast, high-quality
gemini-2.0-flash1MPrevious generation flash
gemini-1.5-pro2MLong-context specialist
gemini-1.5-flash1MLegacy flash model

Setup

  1. Go to Settings > Providers in the dashboard.
  2. Click Add provider and select Google Gemini.
  3. Paste your Google AI API key and click Save.

Usage

import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.floopy.ai/v1",
apiKey: process.env.FLOOPY_API_KEY,
});
const response = await client.chat.completions.create({
model: "gemini-2.5-flash",
messages: [{ role: "user", content: "Explain quantum computing." }],
});

Provider-Specific Features

  • Automatic format translation — Floopy converts OpenAI chat completion format to Google’s generateContent API and back. System instructions, function calling, and multi-turn conversations are all supported.
  • Long context — Gemini models support up to 2M token context windows. Floopy passes the full context through without truncation.

Fallback

Route to OpenAI if Gemini is unavailable:

Terminal window
curl https://api.floopy.ai/v1/chat/completions \
-H "Authorization: Bearer $FLOOPY_API_KEY" \
-H "x-floopy-fallback-provider: openai" \
-H "x-floopy-fallback-model: gpt-4o" \
-H "Content-Type: application/json" \
-d '{"model": "gemini-2.5-flash", "messages": [{"role": "user", "content": "Hello"}]}'