Overview of CLI Proxy API
mainCLI Proxy API is a proxy server designed to provide compatible API interfaces for CLI tools. It allows users to use local or multi-account access for various AI models through OpenAI, Gemini, Claude, and Grok compatible clients and SDKs.
Key Capabilities:
- Compatibility: Supports OpenAI, Gemini, Claude, and Grok compatible endpoints.
- OAuth Support: Enables OpenAI Codex (GPT models), Claude Code, and Grok Build via OAuth login.
- Load Balancing: Provides round-robin load balancing across multiple accounts for Gemini, OpenAI, Claude, and Grok.
- Advanced Features: Supports streaming, non-streaming, WebSocket responses, function calling/tools, and multimodal input (text and images).
- Routing: Supports Amp CLI and IDE extensions with provider routing and model mapping (e.g., routing
claude-opus-4.5toclaude-sonnet-4). - Extensibility: Reusable Go SDK for embedding the proxy and support for OpenAI-compatible upstream providers (like OpenRouter) via configuration.