Sophomoresty/gemini-web2api — reverse-engineered prompt
Reverse engineered prompt
Build me a lightweight Python server that lets me use Google Gemini web through an OpenAI style API, so apps like ChatBox, Cherry Studio, the OpenAI Python SDK, Codex CLI, and Gemini CLI can point at my local server and just work.
I want it to run with a simple python command, default to no login or paid key, and expose the usual chat completions and model list endpoints under /v1. Please support optional API keys, streaming replies, tool calling, web search through Gemini, and several model names like flash, thinking, pro, auto, and lite. Let people adjust thinking depth by adding something like @think=2 to the model name.
Add a config file for port, host, retries, timeout, proxy, logging, API keys, and an optional Gemini cookie file for better Pro routing. Include Docker and compose support, clear examples for curl and the OpenAI SDK, and keep it simple with no unnecessary dependencies.
Want more depth? Deep Reverse