gemini-web2api is a Python bridge that exposes Google Gemini web access through OpenAI-compatible API endpoints. It is designed to let OpenAI-style clients connect to Gemini-like models through routes such as chat completions, models, responses, and native Gemini-compatible endpoints. The project can run as a simple local server and uses a mostly single-file design with an optional dependency for streaming. It supports model aliases for Flash, Thinking, Pro-style routing, Auto, and Lite variants. The tool also includes optional API keys, function calling, SSE streaming, web search access, Docker deployment, and client examples for OpenAI SDK-style usage. It is useful for developers who want local experimentation with OpenAI-compatible tooling while routing requests through Gemini web behavior.

Features

  • OpenAI-compatible API endpoints
  • Chat completions and model listing
  • Function calling support
  • SSE streaming support
  • Adjustable thinking depth suffixes
  • Docker and Docker Compose deployment

Project Samples

Project Activity

See All Activity >