| title | OmniBridge AI Proxy |
|---|---|
| emoji | ⚡ |
| colorFrom | indigo |
| colorTo | purple |
| sdk | docker |
| app_port | 8000 |
| pinned | false |
🇮🇷 برای مطالعه راهنمای فارسی اینجا کلیک کنید
A high-performance, self-hosted AI proxy server that translates Google Gemini, DeepSeek (V3 & R1 with automatic PoW solver), and ChatGPT web sessions into fully OpenAI-compatible and Anthropic-compatible API endpoints — complete with real-time reasoning_content (thinking) streams and a beautiful Persian admin dashboard.
📢 Official Telegram Channel: @Config_Vortex55
Features · Quick Start · API Reference · Admin Dashboard · Deploy
| Feature | Details |
|---|---|
| 🌐 Multi-Provider Engine | Seamlessly proxy Google Gemini, DeepSeek (V3 & R1), and ChatGPT |
| 🧠 DeepSeek PoW Solver | Pure-Python 23-round Keccak-f[1600] solver handles DeepSeekHashV1 automatically |
| 💡 Reasoning Stream | Real-time reasoning_content thinking tokens for DeepSeek-R1 and Gemini Extended |
| 🤝 OpenAI Compatible | Drop-in replacement for POST /v1/chat/completions and GET /v1/models |
| 🔶 Anthropic Compatible | Full POST /anthropic/v1/messages support |
| 🌊 Real-time Streaming | Token-by-token SSE streaming preserving 100% of formatting, indentation, and spaces |
| 🔒 TLS Fingerprinting | curl-cffi Chrome-120 impersonation — bypasses bot detection |
| 🔄 Account Pooling | Round-robin load balancing + automatic cooldown failover across all accounts |
| 🍪 Cookie Auto-Refresh | Background task validates & refreshes session cookies automatically |
| 🗝️ API Key Auth | Generate/revoke sk-omni-... keys with full audit trail |
| 📊 Admin Dashboard | Glassmorphic dark-mode Persian UI with live traffic charts and playground |
| 🖼️ Multi-modal | Image input support via Gemini Vision models |
| 🐋 Docker Ready | Multi-stage Dockerfile + compose + Render Blueprint |
┌─────────────────────────────────────────────────────┐
│ OmniBridge │
│ │
│ ┌──────────┐ ┌──────────────────────────────┐ │
│ │ OpenAI │ │ FastAPI App │ │
│ │ /v1/... │───▶│ │ │
│ └──────────┘ │ ┌────────────────────────┐ │ │
│ ┌──────────┐ │ │ Gemini Engine │ │ │
│ │Anthropic │───▶│ │ + Account Pool │ │ │
│ │ /anth... │ │ │ + Cookie Auto-Refresh │ │ │
│ └──────────┘ │ └────────────────────────┘ │ │
│ ┌──────────┐ │ │ │ │
│ │ Admin │───▶│ ▼ │ │
│ │ /admin │ │ SQLite (aiosqlite) DB │ │
│ └──────────┘ └──────────────────────────────┘ │
└─────────────────────────────────────────────────────┘
git clone https://github.com/exelite-dev/Free-Gemini-pro-API
cd Free-Gemini-pro-API
# Install dependencies
pip install -r requirements.txt
# Configure
cp .env.example .env
# Edit .env: set ADMIN_PASSWORD and ADMIN_SECRET_KEY
# Run
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadOpen http://localhost:8000/admin → login (admin / changeme) → add your Gemini account.
docker compose up -ddocker build -t omnibridge .
docker run -d -p 8000:8000 \
-e ADMIN_PASSWORD=mysecretpassword \
-e ADMIN_SECRET_KEY=$(openssl rand -hex 32) \
-v $(pwd)/data:/app/data \
omnibridge| Variable | Default | Description |
|---|---|---|
ADMIN_USERNAME |
admin |
Admin dashboard username |
ADMIN_PASSWORD |
changeme |
Admin dashboard password (change this!) |
ADMIN_SECRET_KEY |
supersecretkey |
Session signing key (use a long random string) |
GEMINI_ENABLED |
true |
Enable Gemini provider |
DATABASE_PATH |
./data/omnibridge.db |
SQLite database path |
PORT |
8000 |
Server port |
LOG_LEVEL |
info |
Logging verbosity |
All settings can also be configured in config.yaml.
All API endpoints require a Bearer token:
Authorization: Bearer sk-omni-<your-key>
Generate keys at /admin → API Keys tab.
GET /v1/models
Authorization: Bearer sk-omni-...Returns all models for currently enabled providers.
POST /v1/chat/completions
Content-Type: application/json
Authorization: Bearer sk-omni-...
{
"model": "gemini-3.6-flash",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": true
}Available Gemini models:
| Model ID | Description |
|---|---|
gemini-3.6-flash |
Fastest all-rounder (recommended default) |
gemini-3.1-pro |
Advanced reasoning, math & code |
gemini-pro-extended |
Extended thinking / deep reasoning |
gemini-3.5-flash-lite |
Ultra-fast, minimal latency |
gemini-3-pro |
Gemini 3 Pro |
gemini-3-flash |
Gemini 3 Flash |
gemini-2.5-pro |
Gemini 2.5 Pro |
gemini-2.5-flash |
Gemini 2.5 Flash |
gemini-1.5-pro |
Gemini 1.5 Pro |
gemini-1.5-flash |
Gemini 1.5 Flash |
POST /anthropic/v1/messages
Content-Type: application/json
Authorization: Bearer sk-omni-...
{
"model": "gemini-3.6-flash",
"messages": [{"role": "user", "content": "Hello!"}],
"max_tokens": 2048
}curl http://localhost:8000/v1/chat/completions \
-H "Authorization: Bearer sk-omni-xxxx" \
-H "Content-Type: application/json" \
-d '{"model":"gemini-3.6-flash","messages":[{"role":"user","content":"Say hello"}],"stream":false}'Access at http://localhost:8000/admin
| Tab | Description |
|---|---|
| Dashboard | Live request volume chart, success rate, latency, provider health |
| Accounts | Add/edit/delete Gemini accounts, test connections |
| Cookie Guide | Step-by-step cookie extraction guide with screenshots |
| API Keys | Generate sk-omni-... keys, revoke old keys |
| Integration | Copy-ready config for Cursor IDE, NextChat, Python scripts |
| Playground | Live streaming chat — test any model directly |
| Deploy Guide | Hosting instructions for Render, Hugging Face, VPS |
- Log into gemini.google.com with your Google account
- Open DevTools (
F12) → Application tab → Cookies →gemini.google.com - Copy the values of
__Secure-1PSIDand__Secure-1PSIDTS - Go to Admin Dashboard → Accounts → add them
Tip: The admin panel has a built-in visual guide with screenshots under the Cookie Guide tab.
- Fork this repository
- Click the button above (or go to render.com → New → Web Service → connect your fork)
- Set runtime to Docker
- Add environment variables:
ADMIN_PASSWORD,ADMIN_SECRET_KEY - Click Create Web Service — your proxy is live!
git clone https://github.com/exelite-dev/Free-Gemini-pro-API
cd Free-Gemini-pro-API
cp .env.example .env
nano .env # set ADMIN_PASSWORD and ADMIN_SECRET_KEY
docker compose up -d --build- Create a new Space → SDK: Docker
- Push or upload the project files
- In the Dockerfile, change
EXPOSE 8000toEXPOSE 7860and update the CMD port accordingly - Set Space Secrets for
ADMIN_PASSWORDandADMIN_SECRET_KEY
OmniBridge/
├── app/
│ ├── main.py # FastAPI app factory + lifespan
│ ├── config.py # Config (env + YAML, single source of truth)
│ ├── database.py # Async SQLite (accounts, keys, metrics)
│ ├── models.py # Pydantic schemas (OpenAI + Anthropic)
│ ├── auth.py # API key + admin session auth
│ ├── providers/
│ │ ├── base.py # Abstract provider + exceptions
│ │ ├── pool.py # Round-robin account pool + failover
│ │ ├── registry.py # Provider registry
│ │ └── gemini/
│ │ ├── engine.py # curl-cffi TLS, cookie auth, streaming
│ │ └── cookie_refresh.py # Background auto-refresh task
│ ├── routes/
│ │ ├── openai.py # /v1/chat/completions, /v1/models
│ │ ├── anthropic.py # /anthropic/v1/messages
│ │ ├── google_proxy.py # /google/* pass-through proxy
│ │ └── admin.py # Admin REST API + SPA serving
│ └── admin/
│ ├── static/css/ # Glassmorphic design system
│ └── templates/ # Admin SPA (Jinja2 + vanilla JS)
├── tests/
│ └── test_app.py # Unit & integration tests
├── config.yaml # Default provider/model config
├── .env.example # Environment variable template
├── requirements.txt
├── Dockerfile # Multi-stage build
├── docker-compose.yml
├── render.yaml # Render Blueprint
├── README.md
└── README.fa.md # Persian README
- Change
ADMIN_PASSWORDandADMIN_SECRET_KEYbefore any public deployment - Never commit
.envto version control (it's in.gitignore) - In production, run behind a reverse proxy (nginx / Caddy) with TLS termination
- The default
sk-testkey is for local development only — revoke or replace it in production - Gemini cookies are stored encrypted-equivalent in SQLite; rotate them via the admin panel periodically
pip install pytest pytest-anyio
python -m pytest tests/ -vMIT License — see LICENSE for details.
- Telegram: @Config_Vortex55 — updates, tips, and support
