CLIProxyAPIPlus Setup Guide - YOUR SETUP
π Setup Complete!
You have 15 AI accounts configured and ready to use through a single OpenAI-compatible proxy.
π Account Summary
| Provider | Accounts | Type |
|---|---|---|
| Gemini | 6 | OAuth |
| Antigravity | 7 | OAuth |
| Qwen | 1 | OAuth |
| OpenRouter | 1 | API Key |
| Total | 15 |
Your Configured Accounts
- pascal.hintermaier@gmail.com (Gemini)
- hintermaier.pascal@gmail.com (Gemini, Antigravity)
- claracouve342@gmail.com (Gemini, Antigravity)
- hintermaierpascal0@gmail.com (Gemini, Antigravity)
- rave.riotofficial@gmail.com (Gemini, Antigravity)
- citrondon666@gmail.com (Gemini, Antigravity)
- diesmalwichtigsamuel@gmail.com (Antigravity)
- 1x Qwen account
- 1x OpenRouter account
π Quick Start
Server Status
- URL: http://localhost:8317
- Status: Running β
- Config: ~/CLIProxyAPIPlus/config.yaml
- Auth: ~/.cli-proxy-api/
Quick Test
~/CLIProxyAPIPlus/proxy test
List Models
~/CLIProxyAPIPlus/proxy models
π Quick Reference Commands
Using the proxy Script
~/CLIProxyAPIPlus/proxy <command>
Available Commands:
modelsorm- List all available modelstestort- Send test requeststatusors- Check server statusauthora- Show configured accountslogsorl- View recent logsstart- Start proxy serverstop- Stop proxy serverrestartorr- Restart server
Fish Shell Aliases
These are available in your terminal:
Testing:
cliproxy-models # List models
cliproxy-test # Test request
cliproxy-status # Server status
Management:
cliproxy-start # Start server
cliproxy-stop # Stop server
cliproxy-restart # Restart server
cliproxy-logs # View logs
cliproxy-auth # Show accounts
Add Accounts:
gemini-login # Add Gemini
antigravity-login # Add Antigravity
qwen-login # Add Qwen
kiro-login # Add Kiro
π§ Configuration
Environment Variables
$CLIPROXY_URL # http://localhost:8317/v1
$CLIPROXY_KEY # sk-client-key-1
API Keys (from config.yaml)
sk-client-key-1- Primary API keysk-client-key-2- Secondary API key
Client Configuration
OpenAI SDK (Python)
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8317/v1",
api_key="sk-client-key-1"
)
response = client.chat.completions.create(
model="gemini-2.5-pro",
messages=[{"role": "user", "content": "Hello!"}]
)
Node.js
import OpenAI from 'openai';
const openai = new OpenAI({
baseURL: 'http://localhost:8317/v1',
apiKey: 'sk-client-key-1'
});
const completion = await openai.chat.completions.create({
model: 'gemini-2.5-pro',
messages: [{ role: 'user', content: 'Hello!' }]
});
cURL
curl -H "Authorization: Bearer sk-client-key-1" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-pro",
"messages": [{"role": "user", "content": "Hello!"}]
}' \
http://localhost:8317/v1/chat/completions
π― Available Models
The proxy automatically combines models from all providers. To see all available models:
~/CLIProxyAPIPlus/proxy models
Model Aliases
Some models have shorter aliases configured:
g2.5pβgemini-2.5-prog2.5fβgemini-2.5-flashag-proβ Antigravity pro modelqwen-plusβ Qwen coder plus
π Load Balancing
The proxy uses round-robin routing by default. When you make requests:
- First request uses Account 1
- Second request uses Account 2
- Third request uses Account 3
- ...and so on
This automatically distributes load across all your accounts!
π File Structure
~/CLIProxyAPIPlus/
βββ cli-proxy-api-plus # Main binary
βββ config.yaml # Configuration file
βββ server.log # Server logs
βββ proxy # Quick access script
βββ SETUP_GUIDE.md # This file
βββ README.md # Original README
βββ auths/ # (optional, alternate auth location)
~/.cli-proxy-api/ # OAuth tokens stored here
βββ *.json # Provider tokens
βββ ...
π Account Management
Add New Accounts
Gemini:
cd ~/CLIProxyAPIPlus && ./cli-proxy-api-plus -login -incognito
Antigravity:
cd ~/CLIProxyAPIPlus && ./cli-proxy-api-plus -antigravity-login -incognito
Qwen:
cd ~/CLIProxyAPIPlus && ./cli-proxy-api-plus -qwen-login -incognito
Kiro (AWS CodeWhisperer):
cd ~/CLIProxyAPIPlus && ./cli-proxy-api-plus -kiro-aws-login -incognito
View Current Accounts
~/CLIProxyAPIPlus/proxy auth
π οΈ Troubleshooting
Server Not Running
~/CLIProxyAPIPlus/proxy restart
Check Logs
~/CLIProxyAPIPlus/proxy logs
Port Already in Use
~/CLIProxyAPIPlus/proxy stop
sleep 2
~/CLIProxyAPIPlus/proxy start
API Key Errors
- Make sure to use
Authorization: Bearer sk-client-key-1 - Or set correct API key in your client config
Browser Not Opening
- The incognito window might be behind other windows
- Check for browser notifications
- OAuth URLs are also printed in terminal
π Additional Resources
Official Documentation
- CLIProxyAPI: https://github.com/router-for-me/CLIProxyAPI
- CLIProxyAPIPlus: https://github.com/router-for-me/CLIProxyAPIPlus
API Endpoints
GET /v1/models- List all modelsPOST /v1/chat/completions- Chat completionsPOST /v1/completions- Text completions
Management API (requires auth key)
- Base URL:
http://localhost:8317/v0/management - Auth Key:
admin123(set in config.yaml) - Endpoints: Add/remove accounts, view status, etc.
π Advanced Configuration
Edit Config File
nano ~/CLIProxyAPIPlus/config.yaml
Key Settings
port: 8317- Server porthost: ""- Bind to all interfacesapi-keys- Client API keysincognito-browser: true- Multi-account supportrouting.strategy: "round-robin"- Load balancing
Add More Providers
You can add:
- Claude (OAuth)
- OpenAI Codex (OAuth)
- Vertex (OAuth or API key)
- Any OpenAI-compatible provider via
openai-compatibility
β Quick Verification
Run these commands to verify everything works:
# 1. Check server status
~/CLIProxyAPIPlus/proxy status
# 2. View all accounts
~/CLIProxyAPIPlus/proxy auth
# 3. List available models
~/CLIProxyAPIPlus/proxy models
# 4. Test API request
~/CLIProxyAPIPlus/proxy test
All should complete successfully! π
π Need Help?
Common Issues
- "Missing API key" β Add
Authorization: Bearer sk-client-key-1header - "Connection refused" β Server not running, run
~/CLIProxyAPIPlus/proxy start - "Model not found" β Check
~/CLIProxyAPIPlus/proxy modelsfor available models
Get Support
- Check logs:
~/CLIProxyAPIPlus/proxy logs - Restart server:
~/CLIProxyAPIPlus/proxy restart - Review config:
nano ~/CLIProxyAPIPlus/config.yaml
π You're All Set!
Your CLIProxyAPIPlus proxy is running with 15 AI accounts. Use any OpenAI-compatible client and point it to:
http://localhost:8317/v1
The proxy will handle load balancing, account rotation, and provide a unified API endpoint for all your AI providers!
Happy coding! π