A powerful proxy server that wraps CLI-based AI models (Gemini CLI, OpenAI Codex, Claude Code, Qwen Code, iFlow, Antigravity) as OpenAI/Gemini/Claude/Codex compatible API endpoints with OAuth authentication support.
CLIProxyAPI works with all major AI coding assistants:
After deployment, you have two authentication methods:
https://<your-domain>:8085Use Zeabur's shell/terminal feature:
# Navigate to working directory
cd /CLIProxyAPI
# Gemini CLI (OAuth via port 8085)
./CLIProxyAPI -no-browser --login
# OpenAI Codex (OAuth via port 1455)
./CLIProxyAPI -no-browser --codex-login
# Claude Code (OAuth via port 54545)
./CLIProxyAPI -no-browser --claude-login
# Qwen Code
./CLIProxyAPI -no-browser --qwen-login
# iFlow (OAuth via port 11451)
./CLIProxyAPI -no-browser --iflow-login
# Antigravity (OAuth via port 51121)
./CLIProxyAPI -no-browser --antigravity-login
The -no-browser flag displays OAuth URL in terminal for manual browser authentication.
After authentication, configure your tools:
Base URL: https://<your-domain>/v1
API Key: sk-cliproxyapi-default-key-change-me (or update in config.yaml)
Each provider exposes different models:
OpenAI Codex: gpt-5-codex, gpt-5, codex-latest
Claude Code: claude-sonnet-4, claude-opus-4, claude-sonnet-4-5, claude-opus-4-5
Gemini CLI: gemini-2.5-pro, gemini-2.5-flash, gemini-2.0-flash-thinking
Qwen Code: qwen-coder-plus, qwen-turbo, qwen-max
iFlow: tstars2.0
Antigravity: antigravity-latest
{
"models": {
"override": {
"gpt-5-codex": {
"apiKey": "sk-cliproxyapi-default-key-change-me",
"baseURL": "https://<your-domain>/v1"
}
}
}
}
{
"models": [
{
"model": "gpt-5-codex",
"apiKey": "sk-cliproxyapi-default-key-change-me",
"apiBase": "https://<your-domain>/v1"
}
]
}
model_provider = "cliproxyapi"
model = "gpt-5-codex"
[model_providers.cliproxyapi]
name = "cliproxyapi"
base_url = "https://<your-domain>/v1"
wire_api = "responses"
In VS Code Settings → Cline:
OpenAI Compatiblehttps://<your-domain>/v1sk-cliproxyapi-default-key-change-megpt-5-codexThis template includes an optimized config.yaml with:
✅ Remote Management Enabled - Access Web UI from anywhere
✅ Auto-retry on Failures - 3 retries with 30s max interval
✅ Round-robin Load Balancing - Even distribution across accounts
✅ Streaming Keepalive - 15s keepalive for stable connections
✅ Log Management - File-based logging with 100MB limit
✅ Usage Tracking - Built-in usage statistics
✅ Quota Management - Auto-switch projects/models on quota exceeded
Config Location: /CLIProxyAPI/config.yaml
You can edit the config via Zeabur's file editor or terminal to:
See the configuration guide for all options.
Edit /CLIProxyAPI/config.yaml and update the api-keys section:
api-keys:
- "sk-your-secure-key-1"
- "sk-your-secure-key-2"
Add multiple OAuth accounts per provider via Web UI for load balancing, failover, and rate limiting.
For persistent configuration, configure environment variables:
Git Storage:
GITSTORE_GIT_URL=https://github.com/user/config.git
GITSTORE_GIT_TOKEN=ghp_xxxxx
PostgreSQL:
PGSQL_ENABLE=true
PGSQL_DSN=postgres://user:pass@host:5432/db
| Port | Purpose | Protocol |
|---|---|---|
| 8317 | Main API Endpoint | HTTP |
| 8085 | Management Web UI & Gemini OAuth | HTTP |
| 1455 | OpenAI Codex OAuth Callback | TCP |
| 54545 | Claude Code OAuth Callback | TCP |
| 51121 | Antigravity OAuth Callback | TCP |
| 11451 | iFlow OAuth Callback | TCP |
MIT License - See LICENSE