Discover and explore top open-source AI tools and projects—updated daily.
gzzhongqiGemini API proxy for OpenAI-compatible and native access
Top 90.0% on SourcePulse
This project provides a FastAPI-based proxy server that exposes Google's Gemini API through both OpenAI-compatible and native Gemini API endpoints. It enables developers to leverage Google's free Gemini API quota using familiar OpenAI libraries or direct Gemini API calls, streamlining integration for applications already built around the OpenAI API standard.
How It Works
The core of the project is a FastAPI application acting as a reverse proxy. It intercepts requests intended for OpenAI or Gemini APIs and forwards them to the actual Google Gemini API endpoints. This abstraction layer allows for seamless integration, offering compatibility with existing OpenAI client libraries while enabling access to Gemini's capabilities, including multimodal inputs and advanced reasoning features.
Quick Start & Requirements
docker build -t geminicli2api . and run using docker run. Docker Compose configurations are also provided.GEMINI_AUTH_PASSWORD (required), and one of GEMINI_CREDENTIALS (JSON string), GOOGLE_APPLICATION_CREDENTIALS (file path), or GOOGLE_CLOUD_PROJECT/GEMINI_PROJECT_ID.Highlighted Details
/v1/chat/completions) and model listing (/v1/models)./v1beta/models/{model}:generateContent.-search model variants) and fine-grained control over Gemini's reasoning process (-nothinking, -maxthinking model variants).Maintenance & Community
The project welcomes contributions via pull requests. No specific details regarding maintainers, community channels (like Discord/Slack), or a public roadmap are provided in the README.
Licensing & Compatibility
The project is released under the MIT License, which is permissive and generally allows for commercial use and integration into closed-source projects.
Limitations & Caveats
As a proxy, functionality and performance are dependent on the underlying Google Gemini API. Specific rate limits or API changes by Google may affect the proxy's operation. The project requires careful configuration of Google Cloud credentials or equivalent authentication methods. The README does not detail specific unsupported platforms or known bugs.
3 weeks ago
Inactive