proxy

NameLast commit messageLast commit date
.githubUpdate issue templates10 months ago
assetsdocs(readme): add Cubence sponsor10 months ago
authsrebuild branch1 year ago
cmdfix(logging): refactor `ConfigureLogOutput` to accept config object and adjust log directory handling10 months ago
docsdocs: remove Amp CLI integration guides and update references11 months ago
examplesFixed: #60710 months ago
internalfix(translator): adjust `message_delta` emission boundary in Claude-to-OpenAI conversion10 months ago
sdkfeat(config): add support for `Fork` in OAuth model mappings with alias handling10 months ago
testfix(thinking): fallback to upstream model for thinking support when alias not in registry10 months ago
.dockerignorechore: add codex, agents, and opencode dirs to ignore files10 months ago
.env.exampleAdd Object Storage1 year ago
.gitignorechore: add codex, agents, and opencode dirs to ignore files10 months ago
.goreleaser.yml**build(goreleaser): set CGO_ENABLED=0 for cli-proxy-api binaries**11 months ago
config.example.yamlfeat(config): add support for `Fork` in OAuth model mappings with alias handling10 months ago
docker-build.ps1rebuild branch1 year ago
docker-build.shfeat(script): add usage statistics preservation across container rebuilds10 months ago
docker-compose.ymlfix(auth): use fixed antigravity callback port 5112111 months ago
Dockerfilefeat(store): introduce `GitTokenStore` for token persistence via Git backend1 year ago
go.modfeat(remote-management): add support for custom GitHub repository for panel updates11 months ago
go.sumfeat(remote-management): add support for custom GitHub repository for panel updates11 months ago
LICENSEUpdate LICENSE to reflect extended copyright ownership1 year ago
README.mddocs: reorganize README to adjust CodMate placement10 months ago
README_CN.mddocs: reorganize README to adjust CodMate placement10 months ago
README.md

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

z.ai

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.

Get 10% OFF GLM CODING PLAN:https://z.ai/subscribe?ic=8JVLJQFSKB


PackyCode 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.
Cubence Thanks to Cubence for sponsoring this project! Cubence is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. Cubence provides special discounts for our software users: register using this link and enter the "CLIPROXYAPI" promo code during recharge to get 10% 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 docs/sdk-usage.md)

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 (/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

→ Complete Amp CLI Integration Guide

SDK Docs

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

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.

[!NOTE]
If you developed a project based on CLIProxyAPI, 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.