router-for-me/CLIProxyAPI
⭐ 31,785 · Go · GitHub Repo
Wrap Gemini CLI, Antigravity, ChatGPT Codex, Claude Code as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini 3.1 Pro, GPT 5.5, Claude model through API
antigravity claude-code cluade codex gemini openai
1-Sentence Summary
Free AI APIs via OAuth proxy – wrap CLI tools into OpenAI/Gemini/Claude endpoints without API keys.
🔥 Key Capabilities & USP
- Zero API Key Required – Uses OAuth authentication for OpenAI Codex, Claude Code, and Gemini CLI. Eliminates the need for paid API keys by leveraging your existing subscription credentials.
- Multi-Provider Unified Proxy – Exposes a single proxy endpoint that is compatible with OpenAI, Gemini, Claude, and Codex API formats. Solves the fragmentation problem of maintaining separate clients for each AI provider.
- Multi-Account Load Balancing – Round-robin distribution across multiple accounts per provider. Prevents rate limiting and single-account throttling for power users running concurrent workloads.
- Streaming & Multimodal Support – Full support for streaming, non-streaming, WebSocket responses, function calling/tools, and multimodal input (text + images). Matches native API capabilities while using CLI-based models.
- IDE & Amp CLI Integration – Built-in provider routing, model mapping, and smart fallback for Amp CLI and IDE extensions. Enables seamless drop-in replacement for existing AI coding workflows.
USP: The only proxy that turns CLI-based AI tools (which are typically free or subscription-based) into standard API endpoints, effectively giving you free or low-cost access to premium models like Gemini 3.1 Pro, GPT 5.5, and Claude through a familiar API interface.

Technical Architecture
| Component | Details |
|---|---|
| Language | Go (single binary deployment) |
| Core Pattern | Reverse proxy server with protocol translation |
| Backend Providers | Gemini CLI, OpenAI Codex, Claude Code, Antigravity |
| API Compatibility | OpenAI /v1/chat/completions, Gemini /v1beta/models, Claude /v1/messages, Codex endpoints |
| Authentication | OAuth 2.0 flow for credential acquisition (no API keys stored) |
| Load Balancing | Round-robin scheduler across multiple accounts per provider |
| Protocol Support | REST, WebSocket, Server-Sent Events (streaming) |
| Extensibility | Reusable Go SDK for embedding proxy in other applications |
| Management | Admin API endpoints for configuration and health monitoring |
Quick Start Guide
Setup involves three steps:
- Download the binary from the releases page for your OS (Linux, macOS, Windows).
- Configure providers by authenticating via OAuth for each CLI tool you want to proxy.
- Run the proxy server and point your existing OpenAI/Gemini/Claude SDK clients to
http://localhost:8080.
# Download and run the proxy (example for Linux)
wget https://github.com/router-for-me/CLIProxyAPI/releases/latest/download/cliproxyapi-linux-amd64
chmod +x cliproxyapi-linux-amd64
# Start the proxy server (interactive OAuth login will occur on first request)
./cliproxyapi-linux-amd64 --port 8080
# Use with any OpenAI-compatible client
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-pro",
"messages": [{"role": "user", "content": "Hello"}]
}'Pros, Cons & Use Cases
Pros
- Cost elimination – No API key costs; uses your existing subscriptions or free tiers.
- Drop-in replacement – Works with any OpenAI/Gemini/Claude SDK without code changes.
- Multi-account resilience – Load balancing prevents single-point-of-failure from rate limits.
- OAuth simplicity – No key management, rotation, or security risks from leaked keys.
- Active development – 31.7K stars and recent updates indicate strong community and maintenance.
Cons
- Local infrastructure required – Must run and maintain a proxy server on your machine or network.
- External dependency for stats – Usage statistics require separate third-party tools/services.
- OAuth session management – Credentials may expire, requiring re-authentication.
- Third-party dependency – Some features rely on external sponsors/services for full functionality.
- CLI tool availability – Requires the underlying CLI tools (Gemini CLI, Claude Code, etc.) to be installed and working.
Who should NOT use this?
- Enterprise teams with strict compliance – OAuth-based authentication may not meet corporate security policies requiring API key management.
- Users without existing subscriptions – The proxy requires valid subscriptions to the underlying CLI tools; it does not provide free access to models.
- Serverless/edge deployments – Requires a persistent local server; not suitable for AWS Lambda, Cloudflare Workers, or similar ephemeral environments.
- Users needing guaranteed uptime – The proxy depends on the underlying CLI tools being available and your local machine being online.
Ideal Use Cases
- AI-assisted coding workflows – Replace expensive API keys with your ChatGPT/Claude subscription for tools like Copilot, Cursor, or custom IDE plugins.
- Multi-account power users – Developers with multiple Gemini/Claude subscriptions who want to aggregate capacity and avoid rate limits.
- Prototyping and testing – Teams that need to experiment with different models (Gemini, GPT, Claude) without managing multiple API keys and billing accounts.
- CI/CD pipelines – Run AI code review or generation in CI using your existing subscription instead of paid API keys.
- Educational/self-hosted setups – Students or hobbyists who want to use premium AI models through standard APIs without recurring API costs.
Community & Activity
This project is on fire. With 31,785 stars and updates as recent as May 2026, CLIProxyAPI has clearly struck a nerve with the developer community. The Go codebase is actively maintained, and the sheer star count (placing it in the top 0.1% of GitHub projects) signals strong real-world adoption. The project's momentum suggests it's becoming the de facto standard for bridging CLI-based AI tools to standard API interfaces. If you're looking for a proxy solution that the community has already validated at scale, this is it.