Discover and explore top open-source AI tools and projects—updated daily.
Nativu5Gemini models accessible via OpenAI-compatible API
Top 75.1% on SourcePulse
This project provides an OpenAI-compatible API wrapper for Google's web-based Gemini models, targeting developers and researchers who need programmatic access without requiring official API keys. It offers a free, convenient way to integrate Gemini's capabilities, including search and multi-modal support, into applications by leveraging existing Google account cookies.
How It Works
Gemini-FastAPI functions by reverse-engineering the authentication and API calls used by Gemini's web interface. Instead of relying on Google's official API keys, it utilizes secure_1psid and secure_1psidts cookies obtained from a user's Google account session. This approach allows it to expose Gemini models through a familiar OpenAI-like REST API, enabling features like conversation persistence and multi-modal input without direct integration with Google's paid services.
Quick Start & Requirements
uv sync after cloning the repository (git clone https://github.com/Nativu5/Gemini-FastAPI.git && cd Gemini-FastAPI). Alternatively, use pip install -e ..__Secure-1PSID and __Secure-1PSIDTS cookies extracted from the Gemini web interface.uv run python run.py or python run.py. The server defaults to http://localhost:8000. Docker deployment options are also available.config/config.yaml or setting environment variables (prefixed with CONFIG_) to provide necessary cookie credentials.Highlighted Details
Maintenance & Community
The project is built upon HanaokaYuzu/Gemini-API and inspired by zhiyu1998/Gemi2Api-Server. No specific community channels (like Discord/Slack) or active maintainer information beyond the repository owner is detailed in the README.
Licensing & Compatibility
The license is not explicitly stated. However, the project disclaimer emphasizes its use for "educational and research purposes" and notes that it employs "reverse-engineered APIs" which "may not comply with Google's Terms of Service." This suggests potential limitations for commercial use or integration into production environments requiring strict ToS adherence.
Limitations & Caveats
This project relies on reverse-engineered APIs and web cookies, which are subject to change or invalidation by Google at any time. Its use may violate Google's Terms of Service, and it is explicitly intended for educational and research purposes only, carrying inherent risks for broader deployment.
1 month ago
Inactive