CLIProxyAPI: OpenAI-Compatible APIs for CLI Tools
AI companies increasingly lock cheaper access behind CLI-only tools while blocking third-party integrations. CLIProxyAPI bridges this gap by wrapping CLI-based AI tools (Gemini CLI, Claude Code, Antigravity) with OpenAI-compatible API interfaces—letting developers use standard SDKs, manage multiple accounts, and access free tiers without rebuilding integrations. The project handles the unglamorous work of cleaning noisy CLI output and managing authentication, with honest tradeoffs around performance at scale.

Anthropic blocks third-party access to cheaper Claude Code subscriptions. Google walls off free Gemini tiers behind CLI-only interfaces. OpenAI restricts lower-cost access patterns. The trend is clear: AI providers are blocking third-party use of their cheaper subscription tiers, pushing developers toward expensive pay-as-you-go APIs.
CLIProxyAPI wraps CLI-based AI tools—Gemini CLI, Claude Code, Antigravity, ChatGPT Codex—with OpenAI/Gemini/Claude-compatible API interfaces. You keep using standard SDKs and clients without rebuilding integrations from scratch.
The Access Problem
Subscription tiers cost less than API access, but providers limit them to CLI tools that don't play nicely with existing infrastructure. Developers who've built applications around OpenAI's SDK structure face a choice: rewrite everything for each provider's quirks, or find a translation layer.
The maintainer of CLIProxyAPI tried existing alternatives like AIStudioProxyAPI, AIStudio-Build-Proxy, and Gemini-FastAPI before building their own. These tools solve an infrastructure problem that shouldn't exist in the first place.
What It Does
The project provides local or multi-account API access to CLI tools through familiar interfaces. Backend developers keep using their OpenAI client libraries; the proxy handles translation underneath. One use case: accessing Antigravity models through Gemini Pro account login, which maintains separate quota pools.
Another: working around service tier costs that jump 4x after 272k context in certain implementations. CLIProxyAPI routes requests through different accounts or tiers based on context size, token usage, or model availability—flexibility that direct API access doesn't offer.
The CLI Output Problem
CLI tools produce noisy output: passing test results, verbose logs, progress bars, and redundant formatting that would confuse LLMs or bloat token counts. CLIProxyAPI cleans these artifacts before forwarding requests—the unglamorous parsing work that makes the difference between a functional proxy and a broken one.
Performance at Scale
Managing 60+ OAuth accounts triggers CPU spikes to 100% due to unbounded operations, according to open issues. This won't affect small teams or single-account setups, but scaling to enterprise-style multi-tenancy needs architectural work.
That's the natural evolution of infrastructure projects that gain traction faster than anticipated. The issues are documented, and the maintainer hasn't oversold capabilities beyond what the codebase supports.
When You Need This
CLIProxyAPI makes sense for specific scenarios: cost optimization across multiple AI providers, managing tiered access patterns without rebuilding integrations, or accessing restricted subscription tiers through standard tooling. Backend developers working with LLM integrations will recognize these pain points.
If you're only using one provider with stable API pricing, direct integration is simpler. But for teams navigating the shifting access models of multiple AI vendors—where subscription tiers get cheaper while API access gets more restricted—proxy layers have become necessary infrastructure.
The project fills a gap that AI companies created through their pricing strategies. CLIProxyAPI didn't need to exist. But given how providers have structured access, it does.
router-for-me/CLIProxyAPI
Wrap Gemini CLI, Antigravity, ChatGPT Codex, Claude Code, Qwen Code, iFlow as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini 2.5 Pro, GPT 5, Claude, Qwen model through API