← all repositories
router-for-me/CLIProxyAPI

Turn OAuth-locked AI CLI tools into standard API endpoints

A Go proxy that handles OAuth login for Claude Code and Codex so you can call them through standard API clients.

Feature · 19 Jul 2026
Turning ChatGPT Logins Into Load-Balanced API Endpoints

CLIProxyAPI converts OAuth-based CLI sessions from OpenAI, Google, and Anthropic into standard API endpoints, letting developers route coding tools through existing consumer subscriptions instead of enterprise API keys.

Read the in-depth article
CLIProxyAPI
Velocity · 7d
+302
★ / day
Trend
cooling
star history

What it does CLIProxyAPI is a Go proxy that bridges standard OpenAI-compatible clients to CLI-first AI services such as Claude Code, OpenAI Codex, Gemini CLI, and Grok Build. It manages OAuth sessions on your behalf, translates requests and responses into familiar formats, and lets existing SDKs and coding tools consume subscription-based models without native API keys.

The interesting bit The proxy round-robins across multiple accounts for the same provider, effectively pooling free-tier or paid quotas into a single endpoint. It has also spawned a cottage industry of third-party tray apps, dashboards, and VS Code extensions that treat it as a backend for consumer-subscription automation.

Key highlights

  • OpenAI-compatible /v1/chat/completions and messages-style endpoints for Claude, Codex, Gemini, and Grok
  • Automated OAuth flows for services that normally require interactive browser login
  • Multi-account round-robin load balancing to distribute rate limits and quotas
  • Streaming, function calling, multimodal input, and WebSocket passthrough where supported
  • Embeddable Go SDK and dedicated provider routing for Amp CLI integration
  • Management API for runtime configuration and account pooling

Caveats

  • Built-in usage statistics were removed in v6.10.0; tracking now requires external community tools such as CPA Usage Keeper
  • The documentation is heavily interspersed with sponsor advertisements for third-party API relay services, which can make navigation feel like browsing an affiliate marketplace
  • Model name collisions across backends can route requests to unexpected providers unless you carefully manage aliases and prefixes

Verdict Worth exploring if you already hold consumer AI subscriptions and want to script against them without buying separate API credits. Look elsewhere if you need enterprise-grade observability, guaranteed routing isolation, or documentation free of discount codes.

Frequently asked

What is router-for-me/CLIProxyAPI?
A Go proxy that handles OAuth login for Claude Code and Codex so you can call them through standard API clients.
Is CLIProxyAPI open source?
Yes — router-for-me/CLIProxyAPI is open source, released under the MIT license.
What language is CLIProxyAPI written in?
router-for-me/CLIProxyAPI is primarily written in Go.
How popular is CLIProxyAPI?
router-for-me/CLIProxyAPI has 44.3k stars on GitHub and is currently cooling off.
Where can I find CLIProxyAPI?
router-for-me/CLIProxyAPI is on GitHub at https://github.com/router-for-me/CLIProxyAPI.

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