Status: [UNTESTED] Endpoints found: http://localhost:3000/v1/chat/completions http://localhost:3000/v1/responses http://localhost:3000/v1/messages Source: https://github.com/vitkuz573/gemini-proxy # gemini-proxy OpenAI and Anthropic-compatible API proxy for Google Gemini with cookie-based authentication. Drop-in replacement for both OpenAI and Anthropic APIs -- use any compatible client (LiteLLM, Open WebUI, Continue, Claude SDK, etc.) with Google Gemini models. ## Features - **OpenAI-compatible API** -- drop-in replacement for `/v1/chat/completions`, `/v1/models` - **Anthropic Messages API** -- drop-in replacement for `/v1/messages` - **Responses API** -- full support for `POST /v1/responses` endpoint - **Dual auth modes** -- Google API key or browser cookie-based authentication - **Streaming support** -- full SSE streaming with `stream: true` - **stream_options.include_usage** -- streaming usage chunks support - **Tool/function calling** -- OpenAI and Anthropic tools format converted to Gemini function declarations - **Vision support** -- base64 and URL image inputs via `image_url` content parts - **Web frontend mode** -- uses Google's internal web API for cookie auth (no API key needed) - **Reasoning/thinking model support** -- automatic mode detection for Pro, Thinking, and Flash models with `thinking_config` budget for Pro models - **New OpenAI fields** -- `system_fingerprint`, `service_tier`, `parallel_tool_calls`, `reasoning_effort`, `store`, `metadata` - **CORS enabled** -- configurable origins - **Docker ready** -- multi-stage Dockerfile included - **Bearer token auth** -- optional `AUTH_TOKEN` to protect your proxy endpoint - **Rate limiting** -- configurable per-IP rate limiting ## Quick Start ### From source ```bash # Clone git clone https://github.com/vitkuz573/gemini-proxy.git cd gemini-proxy # Configure cp .env.example .env # or create manually # Edit .env with your credentials # Build and run cargo build --release ./target/release/gemini-proxy ``` ### With Docker ```bash docker build -t gemini-proxy . docker run -p 3000:3000 --env-file .env gemini-proxy ``` ## Configuration Create a `.env` file (or export as environment variables