ntthanh2603/gemini-web-to-api
✨Reverse-engineered API for Gemini web app. It can be used as a genuine API key from OpenAI, Gemini, and Claude.
What it solves
This project provides a way to access Google Gemini's latest models via a standardized REST API without needing an official API key. It bypasses the official API by using browser cookies to authenticate requests to the Gemini web interface, allowing users to integrate Gemini into their own applications or test it locally.
How it works
The tool acts as a local proxy server built with Go and Fiber. It takes requests from the user (via OpenAI, Claude, or Gemini-compatible endpoints) and translates them into requests that the Gemini web interface understands. It uses the user's provided browser cookies and account slot to maintain a session and automatically rotates cookies to keep the session alive.
Who it’s for
- Developers who want to use Gemini models without an API key.
- Users who want to test Gemini integration locally.
- Developers building applications that leverage the latest Gemini models via a cookie-based authentication method.
Highlights
- Multi-protocol support: Exposes endpoints compatible with OpenAI, Claude, and Gemini SDKs.
- Automatic session management: Handles cookie rotation to prevent session expiration.
- Dynamic model discovery: Automatically detects available models from the user's account registry.
- Multimodal capabilities: Supports image generation (text-to-image) and image inputs (URLs or base64) in chat requests.
- Production-ready: Includes Docker and Docker Compose support, rate limiting, and interactive API documentation via Scalar UI.
Related
- Project
- Project
- Project
- Project
- Project