Pool multiple free Gemini API keys to get higher combined rate limits for a personal or research project.
Point any OpenAI-compatible tool or library at Gemini without rewriting any integration code.
Monitor the health and status of multiple Gemini API keys from a single admin dashboard.
Add web search or image generation capabilities to Gemini chat requests through one endpoint.
Requires Docker and either MySQL or SQLite, all Gemini API keys must be configured in an environment file before starting.
Gemini Balance is a proxy server that sits between your application and Google's Gemini AI API. Its main job is to manage multiple Gemini API keys at once, cycling through them automatically so no single key takes all the load. If one key fails too many times, the service disables it and moves on. This is useful for developers or teams who have collected multiple free-tier API keys and want to pool their usage limits into a single endpoint. The service accepts requests in two formats: Google's own Gemini API format and the OpenAI-compatible API format. That second option matters because many tools and libraries are already built to talk to OpenAI, so this lets you point those tools at Gemini without rewriting any integration code. It covers chat, text embeddings, and image generation endpoints. Beyond key rotation, Gemini Balance adds features that the base Gemini API does not provide directly. It can attach web search to supported models, enable image generation and image editing through chat, and handle image uploads to external hosting services. There is also an admin web interface for managing configuration in real time without restarting the server, and a monitoring page for checking the status of all configured API keys. Setup is available through Docker (both AMD and ARM images are provided), Docker Compose, or a standard Python local install. Configuration lives in an environment file. The application needs either a MySQL or SQLite database to store logs and key status. The project is licensed under Creative Commons BY-NC 4.0, which allows free personal use but explicitly prohibits commercial resale. The README includes a note that the author has never sold this service and warns against resellers.
← snailyp on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.