Your Gemini browser tab, now an OpenAI-compatible endpoint
A Go proxy that turns your Gemini web cookies into a local REST API speaking OpenAI, Claude, and Gemini protocols — no API key required.

What it does
It runs a local server (Go, Fiber) that authenticates to gemini.google.com using the cookie header you copy from your browser’s network tab, then exposes chat-completion endpoints in three dialects: OpenAI, Claude, and Gemini’s native protocol. Existing SDKs point at it and just work — the api_key field can be literally anything. It also handles session management, auto-rotating cookies on a configurable interval, and supports image generation plus image inputs (remote URLs, data: URLs, multiple reference images).
The interesting bit
Model discovery is dynamic: the proxy reads the model registry from your signed-in Gemini Web session at startup and refresh, so when Google ships a new model it appears without a code update. It’s also honest about quota — if Gemini silently downgrades you to a lower-tier model, the response’s model field reports what actually served the request, with your original choice preserved in requested_model.
Key highlights
- One server, three API protocols — drop-in for OpenAI, Claude, and Gemini SDKs
- Cookie-based auth with automatic session rotation and retries
- Dynamic model list from the live Gemini Web registry (e.g.
gemini-3.1-pro), not a hardcoded allowlist - OpenAI-compatible text-to-image with
b64_jsonoutput - Docker image on GHCR, interactive docs at
/docs, built-in rate limiting
Caveats
- Reverse-engineered and explicitly not affiliated with Google; the README itself warns it may violate Google’s Terms of Service and could risk your account.
- Your cookies are full Google-account credentials — the README is right to shout about not committing them.
- Model names shift as Google renames things; the README tells you to re-query the models endpoint rather than trust old names.
Verdict Great for personal experimentation and local prototyping against Gemini’s newest models without billing setup. Not for anything commercial, production, or dear-to-your-account — the ToS risk is real and stated up front.
Frequently asked
- What is ntthanh2603/gemini-web-to-api?
- A Go proxy that turns your Gemini web cookies into a local REST API speaking OpenAI, Claude, and Gemini protocols — no API key required.
- Is gemini-web-to-api open source?
- Yes — ntthanh2603/gemini-web-to-api is open source, released under the MIT license.
- What language is gemini-web-to-api written in?
- ntthanh2603/gemini-web-to-api is primarily written in Go.
- How popular is gemini-web-to-api?
- ntthanh2603/gemini-web-to-api has 500 stars on GitHub.
- Where can I find gemini-web-to-api?
- ntthanh2603/gemini-web-to-api is on GitHub at https://github.com/ntthanh2603/gemini-web-to-api.