CLIProxyAPI Turns Your AI Subscriptions Into Free API Calls
CLIProxyAPI turns your ChatGPT, Claude, and Gemini subscriptions into a local OpenAI-compatible API server — no API keys, no per-token billing
ProTakeaways
- What it is: CLIProxyAPI wraps Gemini, Claude Code, Codex, Grok, and Antigravity CLIs as a local OpenAI-compatible API server — no API keys needed.
- Core value: Uses OAuth tokens from your existing subscriptions, making each API call cost $0 beyond your monthly plan fee.
- Multi-account load balancing: Add multiple accounts per provider; the proxy round-robins requests and auto-fails over on quota errors.
- Key limitation: Designed for single-user or small-team use — no built-in rate limiting, which can exhaust upstream OAuth accounts if shared widely.
- Claude billing risk: Some users report Anthropic metering proxied requests as "extra usage" at API rates rather than against plan limits — an open issue.
- Ecosystem: 17k+ stars and a growing set of downstream apps (vibeproxy, ProxyPilot, ZeroLimit) built on top; MIT-licensed on GitHub.
CLIProxyAPI is an open-source Go proxy server that does something deceptively simple: it takes the CLI tools you already use , Gemini CLI, Claude Code, OpenAI Codex, Antigravity, Grok Build , and wraps them in a standard OpenAI/Gemini/Claude-compatible HTTP API. The result is a local server your existing tools and SDKs can talk to, backed by your subscription quota instead of a metered API bill. With over 17,000 stars at the time of writing and nearly 2,800 forks, the community reception has been loud and clear.
The problem it actually solves
Most AI subscriptions give you generous usage through their native apps and CLIs, but the API is metered separately and often expensive. You might be paying $20/month for Claude Pro and still get hit with a separate invoice every time you call the API from a script. CLIProxyAPI sits between your application and the CLI tool, translating API requests into CLI invocations and streaming the responses back in OpenAI-compatible format. The marginal cost per request drops to effectively zero beyond your existing subscription fee.
The key differentiator is the OAuth-based approach. LiteLLM and similar proxies are API key routers , they need you to have API access and pay per token. CLIProxyAPI wraps the CLI tools themselves, using your subscription's OAuth tokens, so the marginal cost of each request is effectively zero beyond your subscription fee.
What it supports
CLIProxyAPI wraps multiple AI CLI tools , Gemini, ChatGPT Codex, Claude Code, Qwen Code, iFlow , and exposes them through OpenAI/Gemini/Claude-compatible API interfaces. The provider list has grown substantially since launch and now includes Grok Build and Antigravity (Google's agent-first IDE that replaced Gemini CLI for most users). Supported features include:
- OAuth authentication, multi-account load balancing, streaming responses, function calling, and multimodal inputs
- Round-robin load balancing across multiple accounts per provider
- Model aliasing , route a request for
claude-opus-4.5toclaude-sonnet-4automatically - Automatic failover when one account hits a rate limit
- A reusable Go SDK for embedding the proxy, and integration with Amp CLI for coding tools
- A browser-based management panel at
localhost:8317/management.htmlfor OAuth credentials, logs, and quota visibility
Getting started in three steps
The binary is a single static Go executable with no runtime dependencies. Authentication is OAuth-based , no passwords are stored.
- Download the binary from the GitHub releases page and run
./cliproxyapi - Authenticate each provider via its login command, which opens a browser OAuth flow and saves a token to
~/.cli-proxy-api/ - Point any OpenAI-compatible client at
http://localhost:8317/v1with any string as the API key
A minimal Python call looks like this:
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8317/v1",
api_key="any-string" # not validated
)
response = client.chat.completions.create(
model="gemini-2.5-pro",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)For multi-account load balancing, you authenticate additional accounts with the same login command.
The proxy automatically distributes load across multiple accounts to maximize throughput and avoid rate limits, using a round-robin strategy configurable in config.yaml.
Token expiry is a real operational concern
OAuth tokens expire. Claude tokens last about 7 days, Gemini tokens about 1 hour , though Gemini tokens auto-refresh. This means you need a plan for token rotation in any long-running deployment. The management panel surfaces token status and expiry times, and if one account hits a rate limit or returns an error, the proxy automatically fails over to the next available account, and when the failed account recovers, it rejoins the rotation.
The rough edges
This is a tool designed for personal or small-team use, and it shows in a few places. The server was designed for single-user or trusted small-team use , rate limiting was not considered a baseline requirement for shared deployments. If you expose it to a wider team without a reverse proxy in front, a single client can exhaust all your upstream OAuth accounts.
There is also a subtler billing risk on the Claude side. OAuth-proxied requests through CLIProxy are sometimes metered by Anthropic as "extra usage" billed at API rates against a spending cap, instead of counting against the plan's included usage limits. The whole point of OAuth-based proxying is to share the same metering bucket as the native app. This is an open issue and worth monitoring before committing to it for production workloads.
On the Antigravity side specifically, quota is very low , users report running out of tokens after just a few prompts, even on paid plans. Free tier limits have been cut repeatedly since Antigravity launched in November 2025, and the reductions have been steep rather than incremental. Multi-account rotation helps, but it does not eliminate the underlying quota ceiling.
An ecosystem built on top
The project has spawned a notable set of downstream tools, all using CLIProxyAPI as their backend engine:
- vibeproxy , native macOS menu bar app for Claude Code and ChatGPT subscriptions
- ProxyPilot , Windows-native fork with a TUI and system tray
- ZeroLimit , Tauri + React desktop app for quota monitoring across all providers
- CLIProxyAPI Dashboard , Next.js web UI with real-time log streaming and config editing
- CPA-Manager , full management center with per-request cost estimates and SQLite persistence
The project has accumulated significant stars and forks since its creation in mid-2025, signaling strong community adoption. The official documentation covers quick-start guides, the Go SDK, and the management API for programmatic control over accounts and routing.
Who should actually use this
CLIProxyAPI is a strong fit if you are running AI agents, coding assistants, or automation pipelines and already pay for one or more AI subscriptions.
For anyone running AI agents, coding assistants, or automation pipelines, it eliminates the separate API bill.
It also works well as a local development proxy , swap your OPENAI_BASE_URL to localhost:8317/v1 and your existing code runs against your subscription quota during development.
It is a worse fit for high-concurrency production services, shared team deployments without a reverse proxy, or any use case where you need guaranteed SLA-level throughput. The underlying quotas are controlled by Google, Anthropic, and OpenAI , not by you , and those quotas can and do change without notice.