← all repositories
router-for-me/CLIProxyAPI

Turn your AI CLI subscriptions into a unified API endpoint

A Go proxy that exposes Gemini CLI, Claude Code, Codex, and Grok through standard OpenAI-compatible APIs—no API keys required, just your existing OAuth logins.

CLIProxyAPI
Velocity · 7d
+107
★ / day
Trend
steady
star history

What it does

CLIProxyAPI is a local proxy server that authenticates to Gemini, Claude Code, OpenAI Codex, and Grok via OAuth, then serves those models through familiar OpenAI/Gemini/Claude-compatible API endpoints. You point your existing clients or SDKs at localhost and use your CLI subscriptions as if they were standard API keys.

The interesting bit

The real trick is multi-account load balancing across free or paid CLI tiers—round-robin across several Gemini, Claude, or Codex logins to dodge rate limits. It also exposes provider-specific protocol surfaces (/api/provider/{name}/v1/...) when you need the exact request shape of a backend family rather than a merged abstraction.

Key highlights

  • OAuth-based auth for Codex, Claude Code, Gemini CLI, and Grok Build—no API keys to buy
  • Round-robin load balancing across multiple accounts per provider
  • Streaming, non-streaming, WebSocket, function calling, and multimodal (text + image) support where the backend allows
  • Reusable Go SDK for embedding the proxy in your own tooling
  • Amp CLI/IDE integration with smart model fallback and mapping (e.g., claude-opus-4.5claude-sonnet-4)
  • Active ecosystem: macOS menu bar apps, VSCode extensions, Windows TUIs, web dashboards, and usage trackers all built on top

Caveats

  • Built-in usage statistics were removed in v6.10.0; you now need external tools like CPA Usage Keeper for tracking
  • The README is heavy on sponsor/affiliate content—four separate discount codes before you hit the feature list
  • “Strict backend pinning” requires manual alias management; overlapping model names across providers can route unexpectedly

Verdict

Worth a look if you’re juggling multiple free AI CLI accounts and want to unify them behind a single local API. Skip it if you already have clean API key access and no rate-limit headaches; the OAuth dance and proxy overhead won’t buy you much.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.