Gemini Official OpenAI Compatible Format

GPT-Load now supports Google Gemini's official OpenAI compatible format, allowing you to access the powerful capabilities of Gemini models using standard OpenAI SDK and tools.

Note: This is not format conversion, but transparent proxying of Gemini's official OpenAI compatible format. For details, please refer to the official documentation:https://ai.google.dev/gemini-api/docs/openai

Configuration in GPT-Load

Step 1: Create Gemini Group

Group Configuration

  • Group Name: gemini (recommended name)
  • Channel Type: Select “gemini” type
  • Upstream Address: https://generativelanguage.googleapis.com
  • API Key: Add your Gemini API Key

Important Notes

  • • Use official Google generativelanguage.googleapis.com endpoint
  • • Ensure API key is valid and has sufficient quota
  • • Group will automatically support OpenAI compatible format after creation
  • • Supports load balancing and failover

Step 2: Get Proxy Endpoint

Proxy Endpoint Format:GPT-Load will generate dedicated OpenAI compatible endpoints for Gemini groups

Complete Call Path

http://localhost:3001/proxy/gemini/v1beta/openai/chat/completions

Client Call Examples

Cherry Studio Configuration

Recommended:Cherry Studio is an excellent AI client that perfectly supports Gemini OpenAI compatible format

Configuration Steps

  1. 1. Open Cherry Studio
  2. 2. Create new channel, select OpenAI as provider type
  3. 3. Set base URL to proxy endpoint
  4. 4. Enter proxy key
  5. 5. Start using Gemini models

Configuration Parameters

Provider Type:OpenAI
Base URL:http://localhost:3001/proxy/gemini/v1beta/openai/

(Must end with /)

API Key:your-proxy-key

cURL Direct Call

curl -X POST "http://localhost:3001/proxy/gemini/v1beta/openai/chat/completions" \\
  -H "Authorization: Bearer your-proxy-key" \\
  -H "Content-Type: application/json" \\
  -d '{
    "model": "gemini-2.5-flash",
    "messages": [
      {
        "role": "user",
        "content": "hi"
      }
    ]
  }'

Notes

  • • Ensure GPT-Load version is latest to support Gemini OpenAI compatible format
  • • Cherry Studio base URL must end with slash (/), otherwise calls may fail
  • • Gemini API Key needs sufficient quota and correct permissions