router-for-me/CLIProxyAPI
Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini Series, GPT Series, Grok Series, Claude model through API
What it solves
CLIProxyAPI solves the problem of having to manage many different login accounts and API keys when using command-line AI coding tools such as Claude Code, Codex, Gemini CLI, or Grok. Instead of configuring each tool separately for each provider, you run a single local proxy server that speaks the standard OpenAI, Gemini, and Claude API protocols. Your CLI tools connect to this proxy as if it were the official provider, and the proxy handles the actual authentication, account routing, and load balancing in the background.
How it works
CLIProxyAPI is a proxy server that you run on your own machine. It exposes endpoints that mimic the official APIs of OpenAI (including the Responses endpoint), Gemini (including Interactions), and Claude. You can point any compatible client or SDK to this local address. The proxy accepts your requests, then forwards them to the real provider using credentials you have configured — either via OAuth login flows (for Codex, Claude Code, Grok Build, etc.) or via regular API keys. It supports multiple accounts for the same provider and rotates between them using round-robin load balancing. It also handles streaming and non-streaming responses, WebSocket where supported, function calling/tools, and multimodal input (text and images). A management API is available for controlling the proxy, and since v6.10.0 usage statistics are tracked.
Who it's for
Developers and power users who use several different AI coding CLIs with multiple accounts (for example, a personal Claude Code account plus a work Codex account) and want to centralize access behind one local endpoint. It also suits teams who need to share a common API-compatible gateway across different tools, or who want to use OpenAI-compatible upstream providers like OpenRouter through the same proxy. The project offers a desktop client (EasyCLIProxyAPI) for those who prefer a graphical interface.
Highlights
- Provides local API endpoints that are compatible with OpenAI, Gemini, Claude, and Grok, so existing clients and SDKs work without modification
- Supports OAuth login flows for OpenAI Codex, Claude Code, Grok Build, Gemini CLI, and Antigravity accounts
- Load balances across multiple accounts per provider using round-robin rotation
- Supports streaming (including WebSocket where available), function calling, and multimodal inputs (text and images)
- Can route through OpenAI-compatible upstream providers via configuration (e.g., OpenRouter)
- Comes with a reusable Go SDK for embedding the proxy into other applications
- Includes a management API for operational control, with usage statistics collected from version 6.10.0 onward
Related
- Project
- Project
- Project
- Project
- Project