back to home

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

17,392 stars
2,803 forks
96 issues
GoShellPowerShell

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing router-for-me/CLIProxyAPI in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/router-for-me/CLIProxyAPI)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

CLI Proxy API English | 中文 A proxy server that provides OpenAI/Gemini/Claude/Codex 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 This project is sponsored by Z.ai, supporting us with their GLM CODING PLAN. GLM CODING PLAN is a subscription service designed for AI coding, starting at just $10/month. It provides access to their flagship GLM-4.7 & (GLM-5 Only Available for Pro Users)model across 10+ popular AI coding tools (Claude Code, Cline, Roo Code, etc.), offering developers top-tier, fast, and stable coding experiences. Get 10% OFF GLM CODING PLAN:https://z.ai/subscribe?ic=8JVLJQFSKB --- 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 this link and enter the "cliproxyapi" promo code during recharge to get 10% off. 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 this link to enjoy 20% off your first top-up, and enterprise customers can get up to 25% off! Overview • OpenAI/Gemini/Claude compatible API endpoints for CLI models • OpenAI Codex support (GPT models) via OAuth login • Claude Code support via OAuth login • Qwen Code support via OAuth login • iFlow support via OAuth login • Amp CLI and IDE extensions support with provider routing • Streaming and non-streaming responses • Function calling/tools support • Multimodal input support (text and images) • Multiple accounts with round-robin load balancing (Gemini, OpenAI, Claude, Qwen and iFlow) • Simple CLI authentication flows (Gemini, OpenAI, Claude, Qwen and iFlow) • Generative Language API Key support • AI Studio Build multi-account load balancing • Gemini CLI multi-account load balancing • Claude Code multi-account load balancing • Qwen Code multi-account load balancing • iFlow multi-account load balancing • OpenAI Codex multi-account load balancing • OpenAI-compatible upstream providers via config (e.g., OpenRouter) • Reusable Go SDK for embedding the proxy (see ) Getting Started CLIProxyAPI Guides: https://help.router-for.me/ Management API see MANAGEMENT_API.md Amp CLI Support CLIProxyAPI includes integrated support for Amp CLI and Amp IDE extensions, enabling you to use your Google/ChatGPT/Claude OAuth subscriptions with Amp's coding tools: • Provider route aliases for Amp's API patterns ( ) • Management proxy for OAuth authentication and account features • Smart model fallback with automatic routing • **Model mapping** to route unavailable models to alternatives (e.g., → ) • Security-first design with localhost-only management endpoints **→ Complete Amp CLI Integration Guide** SDK Docs • Usage: docs/sdk-usage.md • Advanced (executors & translators): docs/sdk-advanced.md • Access: docs/sdk-access.md • Watcher: docs/sdk-watcher.md • Custom Provider Example: Contributing Contributions are welcome! Please feel free to submit a Pull Request. • Fork the repository • Create your feature branch ( ) • Commit your changes ( ) • Push to the branch ( ) • Open a Pull Request Who is with us? Those projects are based on CLIProxyAPI: vibeproxy Native macOS menu bar app to use your Claude Code & ChatGPT subscriptions with AI coding tools - no API keys needed Subtitle Translator Browser-based tool to translate SRT subtitles using your Gemini subscription via CLIProxyAPI with automatic validation/error correction - no API keys needed CCS (Claude Code Switch) CLI wrapper for instant switching between multiple Claude accounts and alternative models (Gemini, Codex, Antigravity) via CLIProxyAPI OAuth - no API keys needed ProxyPal Native macOS GUI for managing CLIProxyAPI: configure providers, model mappings, and endpoints via OAuth - no API keys needed. Quotio Native macOS menu bar app that unifies Claude, Gemini, OpenAI, Qwen, 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. CodMate Native 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, Antigravity, and Qwen Code, with built-in and third-party provider rerouting through a single proxy endpoint - no API keys needed for OAuth providers. ProxyPilot Windows-native CLIProxyAPI fork with TUI, system tray, and multi-provider OAuth for AI coding tools - no API keys needed. Claude Proxy VSCode VSCode extension for quick switching between Claude Code models, featuring integrated CLIProxyAPI as its backend with automatic background lifecycle management. ZeroLimit 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 A 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. CLIProxyAPI Tray A Windows tray application implemented using PowerShell scripts, without relying on any th…