Wrap Gemini CLI, Antigravity, ChatGPT Codex, Claude Code, Grok Build as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini 3.1 Pro, GPT 5.5, Grok 4.3, Claude model through API
CLIProxyAPI is a Go-based proxy server that exposes OpenAI, Gemini, Claude, Codex, and Grok compatible HTTP API endpoints by routing requests through their respective CLI tools, including Gemini CLI, Claude Code, OpenAI Codex, and Grok Build. Authentication is handled via OAuth login flows for each supported CLI, allowing multiple accounts to be registered simultaneously with round-robin load balancing across Gemini, OpenAI, Claude, and Grok sessions. The server supports streaming and non-streaming responses, WebSocket connections where applicable, function calling, and multimodal inputs including images. Any application or SDK that targets the OpenAI or Claude API format can point to the local proxy and consume whichever CLI backend is configured, without modifying client code. Developers who want to use Claude Code or other CLI-authenticated models through standard API-compatible tooling, or who need to distribute load across multiple free-tier accounts, are the primary audience. The multi-account round-robin feature is a notable practical detail for users managing rate limits.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Healthy fork ratio
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
git clone https://github.com/router-for-me/CLIProxyAPITools overview
# CLI Proxy API English | [中文](README_CN.md) | [日本語](README_JA.md) A proxy server that provides OpenAI/Gemini/Claude/Codex/Grok compatible API interfaces for CLI. It now also supports OpenAI Codex (GPT models) and Claude Code via OAuth. So you can use local or multi-account CLI access with OpenAI(include Responses)/Gemini/Claude-compatible clients and SDKs. ## Sponsor [](https://www.packyapi.com/register?aff=cliproxyapi) Thanks to PackyCode for sponsoring this project! PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. PackyCode provides special discounts for our software users: register using <a href="https://www.packyapi.com/register?aff=cliproxyapi">this link</a> and enter the "cliproxyapi" promo code during recharge to get 10% off. --- <table> <tbody> <tr> <td width="180"><a href="https://www.aicodemirror.com/register?invitecode=TJNAIF"><img src="./assets/aicodemirror.png" alt="AICodeMirror" width="150"></a></td> <td>Thanks to AICodeMirror for sponsoring this project! AICodeMirror provides official high-stability relay services for Claude Code / Codex / Gemini CLI, with enterprise-grade concurrency, fast invoicing, and 24/7 dedicated technical support. Claude Code / Codex / Gemini official channels at 38% / 2% / 9% of original price, with extra discounts on top-ups! AICodeMirror offers special benefits for CLIProxyAPI users: register via <a href="https://www.aicodemirror.com/register?invitecode=TJNAIF">this link</a> to enjoy 20% off your first top-up, and enterprise customers can get up to 25% off!</td> </tr> <tr> <td width="180"><a href="https://shop.bmoplus.com/?utm_source=github"><img src="./assets/bmoplus.png" alt="BmoPlus" width="150"></a></td> <td>Huge thanks to BmoPlus for sponsoring this project! BmoPlus is a highly reliable AI account provider built strictly for heavy AI users and developers. They offer rock-solid, ready-to-use accounts and official top-up services for ChatGPT Plus / ChatGPT Pro (Full Warranty) / Claude Pro / Super Grok / Gemini Pro. By registering and ordering through <a href="https://shop.bmoplus.com/?utm_source=github">BmoPlus - Premium AI Accounts & Top-ups</a>, users can unlock the mind-blowing rate of <b>10% of the official GPT subscription price (90% OFF)</b>!</td> </tr> <tr> <td width="180"><a href="https://coder.visioncoder.cn"><img src="./assets/visioncoder.png" alt="VisionCoder" width="150"></a></td> <td>Thanks to <b>VisionCoder</b> for supporting this project. <a href="https://coder.visioncoder.cn" target="_blank">VisionCoder Developer Platform</a> is a reliable and efficient API relay service provider, offering access to mainstream AI models such as Claude Code, Codex, and Gemini. It helps developers and teams integrate AI capabilities more easily and improve productivity. <p></p> VisionCoder is also offering our users a limited-time <a href="https://coder.visioncoder.cn" target="_blank">Token Plan</a> promotion: <b>buy 1 month and get 1 month free</b>.</td> </tr> <tr> <td width="180"><a href="https://apikey.fun/register?aff=CLIProxyAPI"><img src="./assets/apikey.png" alt="APIKEY.FUN" width="150"></a></td> <td>Thanks to APIKEY.FUN for sponsoring this project! APIKEY.FUN is a professional enterprise-grade AI relay platform dedicated to providing stable, efficient, and low-cost AI model API access for enterprises and individual developers. The platform supports popular mainstream models such as Claude, OpenAI, and Gemini, with prices as low as 7% of the official price. Register through this project's <a href="https://apikey.fun/register?aff=CLIProxyAPI">exclusive link</a> to enjoy a special <b>permanent 5% top-up discount</b>.</td> </tr> <tr> <td width="180"><a href="https://runapi.co/register?aff=FivD"><img src="./assets/runapi.png" alt="RunAPI" width="150"></a></td> <td>RunAPI is an efficient and stable API platform—an alternative to OpenRouter. A single API Key gives you access to 150+ leading models, including OpenAI, Claude, Gemini, DeepSeek, Grok, and more, at prices as low as 10% of the original (up to 90% off), with exceptional stability. It's seamlessly compatible with tools like Claude Code, OpenClaw, and others. RunAPI offers an exclusive perk for CPA users: <a href="https://runapi.co/register?aff=FivD">register</a> and contact an administrator to claim ¥7 in free credit.</td> </tr> <tr> <td width="180"><a href="https://unity2.ai/register?source=cliproxyapi"><img src="./assets/unity2.jpg" alt="Unity2" width="150"></a></td> <td>Thanks to Unity2.ai for sponsoring this project! Unity2.ai is a high-performance AI model API relay platform for individual developers, teams, and enterprises. It has long served leading domestic enterprises, handles more than 30 billion token calls per day, and supports high concurrency at the 5000 RPM level. It supports balance billing, first top-up bonuses, bundled subscriptions, enterprise invoicing, and dedicated integration support. Register through <a href="https://unity2.ai/register?source=cliproxyapi">this link</a> to receive a $2 balance, then join the official group to get another $10 balance, for up to $12 in free credit.</td> </tr> </tbody> </table> ## Overview - OpenAI/Gemini/Claude/Grok compatible API endpoints for CLI models - OpenAI Codex support (GPT models) via OAuth login - Claude Code support via OAuth login - Grok Build support via OAuth login - Amp CLI and IDE extensions support with provider routing - Streaming, non-streaming, and WebSocket responses where supported - Function calling/tools support - Multimodal input support (text and images) - Multiple accounts with round-robin load balancing (Gemini, OpenAI, Claude, Grok) - Simple CLI authentication flows (Gemini, OpenAI, Claude, Grok) - Generative Language API Key support - AI Studio Build multi-account load balancing - Gemini CLI multi-account load balancing - Claude Code multi-account load balancing - OpenAI Codex multi-account load balancing - Grok Build multi-account load balancing - OpenAI-compatible upstream providers via config (e.g., OpenRouter) - Reusable Go SDK for embedding the proxy (see `docs/sdk-usage.md`) ## Getting Started CLIProxyAPI Guides: [https://help.router-for.me/](https://help.router-for.me/) ## Management API see [MANAGEMENT_API.md](https://help.router-for.me/management/api) ## Usage Statistics Since v6.10.0, CLIProxyAPI and [CPAMC](https://github.com/router-for-me/Cli-Proxy-API-Management-Center) no longer ship built-in usage statistics. If you need usage statistics, use: ### [CPA Usage Keeper](https://github.com/Willxup/cpa-usage-keeper) Standalone persistence and visualization service for CLIProxyAPI, with periodic data sync, SQLite storage, aggregate APIs, and a built-in dashboard for usage and statistics. ### [CPA-Manager-Plus](https://github.com/seakee/CPA-Manager-Plus) Full CLIProxyAPI management center with request-level monitoring and cost estimates. CPA-Manager tracks collected requests by account, model, channel, latency, status, and token usage; estimates cost with editable model prices and one-click LiteLLM price sync; persists events in SQLite; and provides Codex account-pool operations with batch inspection, quota detection, unhealthy account discovery, cleanup suggestions, and one-click execution for day-to-day multi-account maintenance. ## SDK Docs - Usage: [docs/sdk-usage.md](docs/sdk-usage.md) - Advanced (executors & translators): [docs/sdk-advanced.md](docs/sdk-advanced.md) - Access: [docs/sdk-access.md](docs/sdk-access.md) - Watcher: [docs/sdk-watcher.md](docs/sdk-watcher.md) - Custom Provider Example: `examples/custom-provider` ## Contributing Contributions are welcome! Please feel free to submit a Pull Request. 1. Fork the repository 2. Create your feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'Add some amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ## Who is with us? Those projects are based on CLIProxyAPI: ### [vibeproxy](https://github.com/automazeio/vibeproxy) Native macOS menu bar app to use your Claude Code & ChatGPT subscriptions with AI coding tools - no API keys needed ### [Subtitle Translator](https://github.com/VjayC/SRT-Subtitle-Translator-Validator) A cross-platform desktop and web app to translate and validate SRT subtitles using your existing LLM subscriptions (Gemini, ChatGPT, Claude, etc.) via CLIProxyAPI - no API keys needed. ### [CCS (Claude Code Switch)](https://github.com/kaitranntt/ccs) CLI wrapper for instant switching between multiple Claude accounts and alternative models (Gemini, Codex, Antigravity) via CLIProxyAPI OAuth - no API keys needed ### [Quotio](https://github.com/nguyenphutrong/quotio) Native macOS menu bar app that unifies Claude, Gemini, OpenAI, and Antigravity subscriptions with real-time quota tracking and smart auto-failover for AI coding tools like Claude Code, OpenCode, and Droid - no API keys needed. ### [ProxyPilot](https://github.com/Finesssee/ProxyPilot) Windows-native CLIProxyAPI fork with TUI, system tray, and multi-provider OAuth for AI coding tools - no API keys needed. ### [Claude Proxy VSCode](https://github.com/uzhao/claude-proxy-vscode) VSCode extension for quick switching between Claude Code models, featuring integrated CLIProxyAPI as its backend with automatic background lifecycle management. ### [ZeroLimit](https://github.com/0xtbug/zero-limit) Windows desktop app built with Tauri + React for monitoring AI coding assistant quotas via CLIProxyAPI. Track usage across Gemini, Claude, OpenAI Codex, and Antigravity accounts with real-time dashboard, system tray integration, and one-click proxy control - no API keys needed. ### [CPA-XXX Panel](https://github.com/ferretgeek/CPA-X) A lightweight web admin panel for CLIProxyAPI with health checks, res
What people ask about CLIProxyAPI
What is router-for-me/CLIProxyAPI?
+
router-for-me/CLIProxyAPI is tools for the Claude AI ecosystem. Wrap Gemini CLI, Antigravity, ChatGPT Codex, Claude Code, Grok Build as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini 3.1 Pro, GPT 5.5, Grok 4.3, Claude model through API It has 37.4k GitHub stars and was last updated today.
How do I install CLIProxyAPI?
+
You can install CLIProxyAPI by cloning the repository (https://github.com/router-for-me/CLIProxyAPI) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is router-for-me/CLIProxyAPI safe to use?
+
Our security agent has analyzed router-for-me/CLIProxyAPI and assigned a Trust Score of 100/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains router-for-me/CLIProxyAPI?
+
router-for-me/CLIProxyAPI is maintained by router-for-me. The last recorded GitHub activity is from today, with 445 open issues.
Are there alternatives to CLIProxyAPI?
+
Yes. On ClaudeWave you can browse similar tools at /categories/tools, sorted by popularity or recent activity.
Deploy CLIProxyAPI to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/router-for-me-cliproxyapi)<a href="https://claudewave.com/repo/router-for-me-cliproxyapi"><img src="https://claudewave.com/api/badge/router-for-me-cliproxyapi" alt="Featured on ClaudeWave: router-for-me/CLIProxyAPI" width="320" height="64" /></a>More Tools
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
An AI SKILL that provide design intelligence for building professional UI/UX multiple platforms
🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman
AI coding assistant skill (Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and more). Turn any folder of code, SQL schemas, R scripts, shell scripts, docs, papers, images, or videos into a queryable knowledge graph. App code + database schema + infrastructure in one graph.
A light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies