CLIProxyAPI: The Complete Guide to the Universal CLI-to-API Proxy
CLIProxyAPI wraps Gemini CLI, Antigravity, ChatGPT Codex, Claude Code, Qwen Code, and iFlow into a unified OpenAI/Gemini/Claude/Codex compatible API service. Multi-account load balancing, OAuth login, function calling, multimodal, Amp CLI support. 14,700+ stars, Go, MIT.
What Is CLIProxyAPI?
A proxy server written in Go that takes CLI-based AI coding tools and exposes them as standard API endpoints. Instead of using each tool's CLI interface, you get a unified OpenAI-compatible API that works with any client expecting the OpenAI format — while leveraging the underlying CLI subscriptions.
- Language: Go
- License: MIT
- Stars: 14,700+ ⭐
- Forks: 2,380
- Releases: 525
- Created: July 2025
Supported CLI Tools
| CLI Tool | OAuth | Load Balancing |
|---|---|---|
| Gemini CLI | ✅ | ✅ Multi-account |
| Antigravity | ✅ | ✅ |
| ChatGPT Codex | ✅ | ✅ Multi-account |
| Claude Code | ✅ | ✅ Multi-account |
| Qwen Code | ✅ | ✅ Multi-account |
| iFlow | ✅ | ✅ Multi-account |
Core Features
1. OpenAI/Gemini/Claude Compatible API
Standard API endpoints compatible with any client that speaks the OpenAI, Gemini, or Claude API format.
2. Multi-Account Round-Robin Load Balancing
Register multiple accounts for any provider and the proxy automatically distributes requests across them with round-robin balancing.
3. OAuth Login Flows
Simple CLI authentication for all supported providers — Gemini, OpenAI, Claude, Qwen, and iFlow.
4. Streaming & Non-Streaming
Full support for both streaming (SSE) and non-streaming responses.
5. Function Calling / Tools
Native function calling and tools support through the proxy.
6. Multimodal Input
Text and image inputs supported for models that handle multimodal content.
7. Amp CLI & IDE Extensions Support
Integrated support for Amp CLI and IDE extensions:
- Provider route aliases (
/api/provider/{provider}/v1...) - Management proxy for OAuth
- Smart model fallback with automatic routing
- Model mapping (e.g.,
claude-opus-4.5→claude-sonnet-4) - Security-first with localhost-only management
8. Go SDK
Reusable SDK for embedding the proxy in your own Go applications. Includes executors, translators, watchers, and custom provider support.
9. Management API
Full management API for account management, provider configuration, and monitoring.
10. Generative Language API Key Support
Additional support for Google's Generative Language API keys and AI Studio multi-account load balancing.
Community Ecosystem (13+ Projects)
Projects built on CLIProxyAPI:
| Project | Purpose |
|---|---|
| vibeproxy | Alternative proxy |
| Subtitle Translator | SRT subtitle translation |
| CCS (Claude Code Switch) | Provider switching |
| ProxyPal | Proxy companion |
| CodMate | Coding assistant |
| ProxyPilot | Proxy management |
| Claude Proxy VSCode | VSCode extension |
| ZeroLimit | Unlimited access |
| CLIProxyAPI Tray | System tray app |
| CLIProxyAPI Dashboard | Web dashboard |
| All API Hub | API aggregation |
CLIProxyAPI vs Alternatives
Category: This is a CLI-to-API proxy / API gateway for AI coding tools.
| Feature | CLIProxyAPI | CC Switch | LiteLLM |
|---|---|---|---|
| Focus | CLI-to-API proxy | CLI tool switcher | LLM API gateway |
| Stars | 14.7K ⭐ | 25.3K ⭐ | ~18K ⭐ |
| CLI Tools Wrapped | 6 (Gemini, Antigravity, Codex, Claude, Qwen, iFlow) | Config management | ❌ Not CLI-focused |
| API Compatible | ✅ OpenAI/Gemini/Claude | ❌ Not an API proxy | ✅ OpenAI compatible |
| Multi-Account LB | ✅ Round-robin per provider | ❌ | ✅ |
| OAuth Login | ✅ All providers | ❌ | ❌ |
| Function Calling | ✅ | ❌ | ✅ |
| Multimodal | ✅ | ❌ | ✅ |
| Amp CLI Support | ✅ Native | ❌ | ❌ |
| Model Mapping | ✅ Fallback routing | ❌ | ✅ |
| Go SDK | ✅ | ❌ | Python SDK |
| Community Projects | 13+ | ❌ | ❌ |
| Language | Go | Rust | Python |
| Releases | 525 | ~5 | ~100 |
When to choose CLIProxyAPI: You have CLI subscriptions (Gemini CLI, Claude Code, Codex, etc.) and want to expose them as a standard API with multi-account load balancing and OAuth.
When to choose CC Switch: You need a desktop tool switcher for managing multiple CLI configurations, not an API proxy.
When to choose LiteLLM: You need a Python-based LLM API gateway for direct API keys (not CLI-based subscriptions).
Conclusion
CLIProxyAPI is the most complete CLI-to-API proxy in the ecosystem. With 6 CLI tools wrapped, multi-account round-robin load balancing, OAuth login, function calling, multimodal support, Amp CLI integration, a Go SDK, and 525 releases of iteration, it turns your CLI subscriptions into production-ready API endpoints. The 13+ community projects built on top prove its value as infrastructure.
