oxzk-orgs/gemini-web2api — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small Python service that turns the Gemini web chat into an OpenAI compatible API server.

I want to run one file locally and get endpoints like /v1/chat/completions, /v1/models, and /v1/responses so apps that support OpenAI style settings can point to http://localhost:8081/v1. It should work without login by default, but let me optionally set API keys in a config file. It should support normal and streaming chat responses, tool calling in the OpenAI format, Gemini CLI compatible endpoints, model names like flash, flash thinking, pro, auto, and lite, plus an optional @think=N suffix for thinking depth.

Please include a simple config example, Dockerfile and compose setup, proxy support, optional Gemini cookie file support for better Pro routing, and clear README instructions with curl and Python SDK examples. Keep it lightweight, cross platform, Python 3.8 plus, and avoid external dependencies if possible.

Want more depth? Deep Reverse