explaingit

router-for-me/cliproxyapi

📈 Trending33,369GoAudience · developerComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

A local proxy server that unifies multiple AI subscriptions (Claude, ChatGPT, Gemini) under one API endpoint, so coding tools can use them without separate API keys.

Mindmap

mindmap
  root((repo))
    What it does
      Unifies AI subscriptions
      Wraps browser logins
      Exposes standard API
    How it works
      Acts as middleman
      Routes to any model
      Handles streaming
    Use cases
      Use Claude in IDEs
      Load balance accounts
      Avoid duplicate costs
    Tech stack
      Go language
      Self-hosted binary
      Standard API format
    Key features
      Function calling
      Round-robin balancing
      Multiple accounts

Things people build with this

USE CASE 1

Use your Claude or ChatGPT subscription inside VS Code or other IDEs that expect an OpenAI-compatible API key.

USE CASE 2

Spread requests across multiple accounts of the same service to avoid hitting rate limits.

USE CASE 3

Access Gemini, Claude, and ChatGPT models through a single unified endpoint without paying for separate API tiers.

USE CASE 4

Build custom tools or scripts that need to call different AI models without managing multiple authentication methods.

Tech stack

GoOpenAI API formatGemini API format

Getting it running

Difficulty · moderate Time to first run · 30min

Requires API keys for Claude, ChatGPT, and/or Gemini to be functional; Go binary compilation needed if not pre-built.

Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

CLIProxyAPI is a local proxy server that lets you use AI coding tools like Gemini CLI, Claude Code, and OpenAI Codex through a standardized API interface, without needing separate API keys for each service. Instead, it wraps your existing paid subscriptions (the ones you already log into via a web browser) and exposes them as if they were a single unified API endpoint that many AI tools and apps already know how to talk to. The problem it solves is fragmentation. Developers often have subscriptions to multiple AI services but want to use them through a single tool or coding assistant. CLIProxyAPI acts as a middleman: you log in to your accounts once, and then any app that supports the standard OpenAI or Gemini API format can route requests through CLIProxyAPI to whichever underlying model you want. It handles the full range of response types, streaming (where text appears word by word), non-streaming (full response at once), and function-calling (where the AI can invoke tools on your behalf). It also supports multiple accounts per service with round-robin load balancing, meaning it cycles through accounts automatically to spread usage. Someone would use this when they already pay for Claude, ChatGPT, or Gemini subscriptions and want to unlock those models inside coding environments or apps that only accept an API key format. Rather than paying again for API access on top of subscription costs, CLIProxyAPI bridges the gap. The project is written in Go, which makes it fast and easy to run as a self-hosted binary on your own machine or server.

Copy-paste prompts

Prompt 1
How do I set up CLIProxyAPI to use my existing ChatGPT subscription in VS Code?
Prompt 2
Show me how to configure CLIProxyAPI to load-balance requests across multiple Claude accounts.
Prompt 3
How do I route requests from a custom app through CLIProxyAPI to use Gemini instead of OpenAI?
Prompt 4
What are the steps to deploy CLIProxyAPI on my local machine and connect it to my AI subscriptions?
Prompt 5
How does CLIProxyAPI handle streaming responses from different AI models?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.