CLI Proxy API is a proxy server designed to provide OpenAI/Gemini/Claude compatible API interfaces for command-line tools (CLI). It supports access to OpenAI Codex (GPT models), Claude Code, and Qwen Code via OAuth authentication. This software enables seamless local or multi-account CLI access using OpenAI-compatible clients and SDKs.
Key Features:
OpenAI/Gemini/Claude compatible API endpoints for CLI tools.
Support for OpenAI Codex (GPT models) and Claude Code via OAuth login.
Integration with Qwen Code, the first Chinese provider supported by the software.
Streaming and non-streaming response options.
Function calling and multimodal input support (text and images).
Multi-account load balancing across Gemini, OpenAI, Claude, and Qwen providers.
Audience & Benefit:
Ideal for developers, researchers, and enterprises seeking to integrate AI models into CLI tools or applications. Users benefit from unified access to multiple AI platforms through a single API interface, enabling efficient model switching, cost optimization via free tiers, and enhanced productivity through load balancing.
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 $3/month. It provides access to their flagship GLM-4.7 model across 10+ popular AI coding tools (Claude Code, Cline, Roo Code, etc.), offering developers top-tier, fast, and stable coding experiences.
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
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 (/api/provider/{provider}/v1...)
Management proxy for OAuth authentication and account features
Smart model fallback with automatic routing
Model mapping to route unavailable models to alternatives (e.g., claude-opus-4.5 → claude-sonnet-4)
Security-first design with localhost-only management endpoints
Browser-based tool to translate SRT subtitles using your Gemini subscription via CLIProxyAPI with automatic validation/error correction - no API keys needed
CLI wrapper for instant switching between multiple Claude accounts and alternative models (Gemini, Codex, Antigravity) via CLIProxyAPI OAuth - no API keys needed
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.
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.
VSCode extension for quick switching between Claude Code models, featuring integrated CLIProxyAPI as its backend with automatic background lifecycle management.
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.
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.
A 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.
霖君 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, Qwen Code, and other AI coding tools, with local proxy for multi-account quota tracking and one-click configuration.
> [!NOTE]
> If you developed a project based on CLIProxyAPI, please open a PR to add it to this list.
More choices
Those projects are ports of CLIProxyAPI or inspired by it:
A 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.
> [!NOTE]
> If you have developed a port of CLIProxyAPI or a project inspired by it, please open a PR to add it to this list.
License
This project is licensed under the MIT License - see the LICENSE file for details.