{"id":31285005,"url":"https://github.com/router-for-me/cliproxyapi","last_synced_at":"2026-06-03T19:00:32.068Z","repository":{"id":302734314,"uuid":"1012087571","full_name":"router-for-me/CLIProxyAPI","owner":"router-for-me","description":"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","archived":false,"fork":false,"pushed_at":"2026-05-31T06:42:45.000Z","size":15989,"stargazers_count":35513,"open_issues_count":378,"forks_count":5891,"subscribers_count":83,"default_branch":"main","last_synced_at":"2026-05-31T08:13:45.192Z","etag":null,"topics":["antigravity","claude-code","cluade","codex","gemini","openai"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/router-for-me.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":["router-for-me"]}},"created_at":"2025-07-01T19:43:27.000Z","updated_at":"2026-05-31T08:07:37.000Z","dependencies_parsed_at":"2026-05-04T15:02:19.042Z","dependency_job_id":null,"html_url":"https://github.com/router-for-me/CLIProxyAPI","commit_stats":null,"previous_names":["luispater/cliproxyapi","router-for-me/cliproxyapi"],"tags_count":888,"template":false,"template_full_name":null,"purl":"pkg:github/router-for-me/CLIProxyAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/router-for-me%2FCLIProxyAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/router-for-me%2FCLIProxyAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/router-for-me%2FCLIProxyAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/router-for-me%2FCLIProxyAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/router-for-me","download_url":"https://codeload.github.com/router-for-me/CLIProxyAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/router-for-me%2FCLIProxyAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33876333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antigravity","claude-code","cluade","codex","gemini","openai"],"created_at":"2025-09-24T08:00:54.980Z","updated_at":"2026-06-03T19:00:32.055Z","avatar_url":"https://github.com/router-for-me.png","language":"Go","funding_links":["https://github.com/sponsors/router-for-me"],"categories":["CLIs"],"sub_categories":[],"readme":"# CLI Proxy API\n\nEnglish | [中文](README_CN.md) | [日本語](README_JA.md)\n\nA proxy server that provides OpenAI/Gemini/Claude/Codex/Grok compatible API interfaces for CLI.\n\nIt now also supports OpenAI Codex (GPT models) and Claude Code via OAuth.\n\nSo you can use local or multi-account CLI access with OpenAI(include Responses)/Gemini/Claude-compatible clients and SDKs.\n\n## Sponsor\n\n[![https://www.packyapi.com/register?aff=cliproxyapi](./assets/packycode-en.png)](https://www.packyapi.com/register?aff=cliproxyapi)\n\nThanks to PackyCode for sponsoring this project!\n\nPackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more.\n\nPackyCode provides special discounts for our software users: register using \u003ca href=\"https://www.packyapi.com/register?aff=cliproxyapi\"\u003ethis link\u003c/a\u003e and enter the \"cliproxyapi\" promo code during recharge to get 10% off.\n\n---\n\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd width=\"180\"\u003e\u003ca href=\"https://www.aicodemirror.com/register?invitecode=TJNAIF\"\u003e\u003cimg src=\"./assets/aicodemirror.png\" alt=\"AICodeMirror\" width=\"150\"\u003e\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eThanks 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 \u003ca href=\"https://www.aicodemirror.com/register?invitecode=TJNAIF\"\u003ethis link\u003c/a\u003e to enjoy 20% off your first top-up, and enterprise customers can get up to 25% off!\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"180\"\u003e\u003ca href=\"https://shop.bmoplus.com/?utm_source=github\"\u003e\u003cimg src=\"./assets/bmoplus.png\" alt=\"BmoPlus\" width=\"150\"\u003e\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eHuge 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 \u003ca href=\"https://shop.bmoplus.com/?utm_source=github\"\u003eBmoPlus - Premium AI Accounts \u0026 Top-ups\u003c/a\u003e, users can unlock the mind-blowing rate of \u003cb\u003e10% of the official GPT subscription price (90% OFF)\u003c/b\u003e!\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"180\"\u003e\u003ca href=\"https://coder.visioncoder.cn\"\u003e\u003cimg src=\"./assets/visioncoder.png\" alt=\"VisionCoder\" width=\"150\"\u003e\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eThanks to \u003cb\u003eVisionCoder\u003c/b\u003e for supporting this project. \u003ca href=\"https://coder.visioncoder.cn\" target=\"_blank\"\u003eVisionCoder Developer Platform\u003c/a\u003e 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.\n\u003cp\u003e\u003c/p\u003e\nVisionCoder is also offering our users a limited-time \u003ca href=\"https://coder.visioncoder.cn\" target=\"_blank\"\u003eToken Plan\u003c/a\u003e promotion: \u003cb\u003ebuy 1 month and get 1 month free\u003c/b\u003e.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"180\"\u003e\u003ca href=\"https://apikey.fun/register?aff=CLIProxyAPI\"\u003e\u003cimg src=\"./assets/apikey.png\" alt=\"APIKEY.FUN\" width=\"150\"\u003e\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eThanks 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 \u003ca href=\"https://apikey.fun/register?aff=CLIProxyAPI\"\u003eexclusive link\u003c/a\u003e to enjoy a special \u003cb\u003epermanent 5% top-up discount\u003c/b\u003e.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n## Overview\n\n- OpenAI/Gemini/Claude/Grok compatible API endpoints for CLI models\n- OpenAI Codex support (GPT models) via OAuth login\n- Claude Code support via OAuth login\n- Grok Build support via OAuth login\n- Amp CLI and IDE extensions support with provider routing\n- Streaming, non-streaming, and WebSocket responses where supported\n- Function calling/tools support\n- Multimodal input support (text and images)\n- Multiple accounts with round-robin load balancing (Gemini, OpenAI, Claude, Grok)\n- Simple CLI authentication flows (Gemini, OpenAI, Claude, Grok)\n- Generative Language API Key support\n- AI Studio Build multi-account load balancing\n- Gemini CLI multi-account load balancing\n- Claude Code multi-account load balancing\n- OpenAI Codex multi-account load balancing\n- Grok Build multi-account load balancing\n- OpenAI-compatible upstream providers via config (e.g., OpenRouter)\n- Reusable Go SDK for embedding the proxy (see `docs/sdk-usage.md`)\n\n## Getting Started\n\nCLIProxyAPI Guides: [https://help.router-for.me/](https://help.router-for.me/)\n\n## Management API\n\nsee [MANAGEMENT_API.md](https://help.router-for.me/management/api)\n\n## Usage Statistics\n\nSince 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:\n\n### [CPA Usage Keeper](https://github.com/Willxup/cpa-usage-keeper)\n\nStandalone persistence and visualization service for CLIProxyAPI, with periodic data sync, SQLite storage, aggregate APIs, and a built-in dashboard for usage and statistics.\n\n### [CPA-Manager-Plus](https://github.com/seakee/CPA-Manager-Plus)\n\nFull 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.\n\n## Amp CLI Support\n\nCLIProxyAPI includes integrated support for [Amp CLI](https://ampcode.com) and Amp IDE extensions, enabling you to use your Google/ChatGPT/Claude OAuth subscriptions with Amp's coding tools:\n\n- Provider route aliases for Amp's API patterns (`/api/provider/{provider}/v1...`)\n- Management proxy for OAuth authentication and account features\n- Smart model fallback with automatic routing\n- **Model mapping** to route unavailable models to alternatives (e.g., `claude-opus-4.5` → `claude-sonnet-4`)\n- Security-first design with localhost-only management endpoints\n\nWhen you need the request/response shape of a specific backend family, use the provider-specific paths instead of the merged `/v1/...` endpoints:\n\n- Use `/api/provider/{provider}/v1/messages` for messages-style backends.\n- Use `/api/provider/{provider}/v1beta/models/...` for model-scoped generate endpoints.\n- Use `/api/provider/{provider}/v1/chat/completions` for chat-completions backends.\n\nThese routes help you select the protocol surface, but they do not by themselves guarantee a unique inference executor when the same client-visible model name is reused across multiple backends. Inference routing is still resolved from the request model/alias. For strict backend pinning, use unique aliases, prefixes, or otherwise avoid overlapping client-visible model names.\n\n**→ [Complete Amp CLI Integration Guide](https://help.router-for.me/agent-client/amp-cli.html)**\n\n## SDK Docs\n\n- Usage: [docs/sdk-usage.md](docs/sdk-usage.md)\n- Advanced (executors \u0026 translators): [docs/sdk-advanced.md](docs/sdk-advanced.md)\n- Access: [docs/sdk-access.md](docs/sdk-access.md)\n- Watcher: [docs/sdk-watcher.md](docs/sdk-watcher.md)\n- Custom Provider Example: `examples/custom-provider`\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Who is with us?\n\nThose projects are based on CLIProxyAPI:\n\n### [vibeproxy](https://github.com/automazeio/vibeproxy)\n\nNative macOS menu bar app to use your Claude Code \u0026 ChatGPT subscriptions with AI coding tools - no API keys needed\n\n### [Subtitle Translator](https://github.com/VjayC/SRT-Subtitle-Translator-Validator)\n\nA 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.\n\n### [CCS (Claude Code Switch)](https://github.com/kaitranntt/ccs)\n\nCLI wrapper for instant switching between multiple Claude accounts and alternative models (Gemini, Codex, Antigravity) via CLIProxyAPI OAuth - no API keys needed\n\n### [Quotio](https://github.com/nguyenphutrong/quotio)\n\nNative 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.\n\n### [CodMate](https://github.com/loocor/CodMate)\n\nNative macOS SwiftUI app for managing CLI AI sessions (Codex, Claude Code, Gemini CLI) with unified provider management, Git review, project organization, global search, and terminal integration. Integrates CLIProxyAPI to provide OAuth authentication for Codex, Claude, Gemini, and Antigravity, with built-in and third-party provider rerouting through a single proxy endpoint - no API keys needed for OAuth providers.\n\n### [ProxyPilot](https://github.com/Finesssee/ProxyPilot)\n\nWindows-native CLIProxyAPI fork with TUI, system tray, and multi-provider OAuth for AI coding tools - no API keys needed.\n\n### [Claude Proxy VSCode](https://github.com/uzhao/claude-proxy-vscode)\n\nVSCode extension for quick switching between Claude Code models, featuring integrated CLIProxyAPI as its backend with automatic background lifecycle management.\n\n### [ZeroLimit](https://github.com/0xtbug/zero-limit)\n\nWindows 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.\n\n### [CPA-XXX Panel](https://github.com/ferretgeek/CPA-X)\n\nA lightweight web admin panel for CLIProxyAPI with health checks, resource monitoring, real-time logs, auto-update, request statistics and pricing display. Supports one-click installation and systemd service.\n\n### [CLIProxyAPI Tray](https://github.com/kitephp/CLIProxyAPI_Tray)\n\nA Windows tray application implemented using PowerShell scripts, without relying on any third-party libraries. The main features include: automatic creation of shortcuts, silent running, password management, channel switching (Main / Plus), and automatic downloading and updating.\n\n### [霖君](https://github.com/wangdabaoqq/LinJun)\n\n霖君 is a cross-platform desktop application for managing AI programming assistants, supporting macOS, Windows, and Linux systems. Unified management of Claude Code, Gemini CLI, OpenAI Codex, and other AI coding tools, with local proxy for multi-account quota tracking and one-click configuration.\n\n### [CLIProxyAPI Dashboard](https://github.com/itsmylife44/cliproxyapi-dashboard)\n\nA modern web-based management dashboard for CLIProxyAPI built with Next.js, React, and PostgreSQL. Features real-time log streaming, structured configuration editing, API key management, OAuth provider integration for Claude/Gemini/Codex, usage analytics, container management, and config sync with OpenCode via companion plugin - no manual YAML editing needed.\n\n### [All API Hub](https://github.com/qixing-jk/all-api-hub)\n\nBrowser extension for one-stop management of New API-compatible relay site accounts, featuring balance and usage dashboards, auto check-in, one-click key export to common apps, in-page API availability testing, and channel/model sync and redirection. It integrates with CLIProxyAPI through the Management API for one-click provider import and config sync.\n\n### [Shadow AI](https://github.com/HEUDavid/shadow-ai)\n\nShadow AI is an AI assistant tool designed specifically for restricted environments. It provides a stealthy operation\nmode without windows or traces, and enables cross-device AI Q\u0026A interaction and control via the local area network (\nLAN). Essentially, it is an automated collaboration layer of \"screen/audio capture + AI inference + low-friction delivery\",\nhelping users to immersively use AI assistants across applications on controlled devices or in restricted environments.\n\n### [ProxyPal](https://github.com/buddingnewinsights/proxypal)\n\nCross-platform desktop app (macOS, Windows, Linux) wrapping CLIProxyAPI with a native GUI. Connects Claude, ChatGPT, Gemini, GitHub Copilot, and custom OpenAI-compatible endpoints with usage analytics, request monitoring, and auto-configuration for popular coding tools - no API keys needed.\n\n### [CLIProxyAPI Quota Inspector](https://github.com/AllenReder/CLIProxyAPI-Quota-Inspector)\n\nReady-to-use cross-platform quota inspector for CLIProxyAPI, supporting per-account codex 5h/7d quota windows, plan-based sorting, status coloring, and multi-account summary analytics.\n\n### [CodexCliPlus](https://github.com/C4AL/CodexCliPlus)\n\nWindows-focused, local-first desktop management platform for Codex CLI built on CLIProxyAPI, focused on simplifying local setup, account and runtime management, and providing a more complete Codex CLI experience for local users.\n\n### [CLIProxy Pool Watch](https://github.com/murasame612/CLIProxyPoolWidget)\n\nNative macOS SwiftUI app for monitoring ChatGPT/Codex account quotas in CLIProxyAPI pools. Displays account availability, Plus-base capacity, 5-hour and weekly quota bars, plan weights, and restore forecasts through the Management API.\n\n### [Panopticon](https://github.com/eltmon/panopticon-cli)\n\nMulti-agent orchestration for AI coding assistants. Runs CLIProxyAPI as a local sidecar so its agents can drive GPT models through a ChatGPT subscription, pointing Claude Code at an Anthropic-compatible endpoint with no OpenAI API key required.\n\n\u003e [!NOTE]  \n\u003e If you developed a project based on CLIProxyAPI, please open a PR to add it to this list.\n\n## More choices\n\nThose projects are ports of CLIProxyAPI or inspired by it:\n\n### [9Router](https://github.com/decolua/9router)\n\nA Next.js implementation inspired by CLIProxyAPI, easy to install and use, built from scratch with format translation (OpenAI/Claude/Gemini/Ollama), combo system with auto-fallback, multi-account management with exponential backoff, a Next.js web dashboard, and support for CLI tools (Cursor, Claude Code, Cline, RooCode) - no API keys needed.\n\n### [OmniRoute](https://github.com/diegosouzapw/OmniRoute)\n\nNever stop coding. Smart routing to FREE \u0026 low-cost AI models with automatic fallback.\n\nOmniRoute is an AI gateway for multi-provider LLMs: an OpenAI-compatible endpoint with smart routing, load balancing, retries, and fallbacks. Add policies, rate limits, caching, and observability for reliable, cost-aware inference.\n\n### [Playful Proxy API Panel (PPAP)](https://github.com/daishuge/playful-proxy-api-panel)\n\nA public CLIProxyAPI-compatible fork and bundled management panel. It keeps upstream-style usage while restoring built-in usage statistics, adding cache hit rate, first-byte latency, TPS tracking, and Docker-oriented self-hosted installation docs.\n\n### [Codex Switch](https://github.com/9ycrooked/CodexSwitch)\n\nThis is a tool built with Tauri 2 + Vue 3 for managing multiple OpenAI Codex desktop accounts. Switch between saved ChatGPT/Codex certification profiles, check 5-hour and weekly quota usage in real time, verify token health, view active account details, and import or save auth.json files without manual copying.\n\n\u003e [!NOTE]  \n\u003e If you have developed a port of CLIProxyAPI or a project inspired by it, please open a PR to add it to this list.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frouter-for-me%2Fcliproxyapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frouter-for-me%2Fcliproxyapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frouter-for-me%2Fcliproxyapi/lists"}