[UNTESTED] [zhu748/gemini-web-api-gateway] 2 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,171 characters
Status: [UNTESTED]
Endpoints found:
http://localhost:3000/api/v1/chat/completions
http://localhost:3000/api/v1
Source: https://github.com/zhu748/gemini-web-api-gateway
# Gemini Web API Gateway
An OpenAI-compatible reverse proxy for [gemini.google.com](https://gemini.google.com) (the Gemini web app). Turn your Google account cookies into a standard `chat/completions` API with streaming support, SOCKS/HTTP proxy tunneling and a built-in management dashboard.
```
OpenAI SDK / curl ──► /api/v1/chat/completions ──► Gemini Web (gemini.google.com)
│ cookie auth · model routing · SSE streaming
└─ optional SOCKS4/5 or HTTP proxy
```
## Features
- **OpenAI-compatible API** - drop-in `POST /api/v1/chat/completions` and `GET /api/v1/models` endpoints, both streaming (SSE) and non-streaming.
- **Cookie authentication** - authenticates to the Gemini web app with `__Secure-1PSID` and friends, keeps the session alive via `accounts.google.com/RotateCookies` rotation.
- **Proxy tunneling** - route all upstream traffic through a SOCKS4/SOCKS5 (with auth) or HTTP/HTTPS proxy.
- **Dynamic model discovery** - resolves the account's available models at runtime (model ids, tier capacities, model numbers) with a static fallback catalogue.
- **Loose model matching** - `gemini-flash-lite`, `gemini-2.5-flash-lite`, `3.5flashlite`, `flash-lite-latest`, `auto`… all resolve to the right upstream model.
- **Live dashboard** - configure cookies/proxy, inspect session health, test prompts in a streaming playground, read request logs.
- **Request logging** - every completion is recorded (model, prompt, status, duration) in SQLite via Prisma.
- **Optional API key** - protect the public endpoints with a bearer token (open access when unset).
## Tech Stack
Next.js 16 (App Router) · TypeScript · Tailwind CSS 4 · shadcn/ui · Prisma (SQLite) · undici + socks
## Getting Started
```bash
# 1. Install dependencies
bun install # or npm install
# 2. Configure the database
cp .env.example .env # DATABASE_URL=file:./db/custom.db
bun run db:push
# 3. Start the dev se