Claude Code model router
Claude Code Proxy
API proxy for Claude CLI — exposes Anthropic Messages API and OpenAI Chat Completions endpoints, powered by your Claude Max subscription
Install
git clone https://github.com/AntonioAEMartins/claude-code-proxy.gitFrom the README
Claude Code Proxy Use your Claude Max subscription as an API. This proxy wraps the Claude CLI as a subprocess and exposes standard API endpoints that any SDK or tool can talk to. Two APIs, one proxy: - Anthropic Messages API — POST /v1/messages - OpenAI Chat Completions API — POST /v1/chat/completions Works with the Anthropic SDK, OpenAI SDK, Python clients, Cursor, Continue, aider, LiteLLM, OpenClaw, and anything else that accepts a custom base URL. Why? Claude Max gives you generous usage through the CLI, but no API access. This proxy bridges that gap — run it locally and point any SDK at it. Prerequisites - Node.js 20+ - Claude CLI installed and authenticated (claude --version should work) - Claude Max subscription (the CLI must be logged in) Install Usage The proxy starts on http://127.0.0.1:4523 by default. Connect Your SDK TypeScript / JavaScript Python Other Tools Any tool with a "custom base URL" or "OpenAI-compatible" setting works: Use any sonnet, opus, or haiku family name as the model, including versioned variants like claude-sonnet-4-6, claude-opus-4-7, sonnet-4-7, or haiku-5. Model names with a claude-code-cli/ or openai/ prefix are also accepted (the prefix is stripped automatically). Unknown model families return HTTP 400 instead of falling back to the DEFAULT_MODEL. Streaming Both APIs support streaming out of the box: Available Models Features - Streaming & non-streaming for both Anthropic and OpenAI formats - System prompts - Multi-turn conversations - Tool use / function calling via MCP bridge - Structured output (JSON schema) - Extended thinking (set ENABLE_THINKING=true) - Effort levels — low, medium, high, max (model-dependent) - Rate limit propagation from CLI quota - Auto-cleanup — subprocess killed on client disconnect or…
Details
- Repository
- AntonioAEMartins/claude-code-proxy
- Language
- TypeScript
- License
- MIT
- Last updated
- 3 May 2026
FAQ
What is Claude Code Proxy?
API proxy for Claude CLI — exposes Anthropic Messages API and OpenAI Chat Completions endpoints, powered by your Claude Max subscription It is a model router for Claude Code, from AntonioAEMartins/claude-code-proxy on GitHub.
How do I install Claude Code Proxy?
Clone AntonioAEMartins/claude-code-proxy from GitHub and follow the setup steps in its README.
Is Claude Code Proxy popular?
AntonioAEMartins/claude-code-proxy has 29 GitHub stars and 6 forks. It was last updated on 3 May 2026.
More model routers & proxies
StackFerry
30Ninthless/StackFerry
Desktop provider manager and local failover router for Codex, Claude Code, and Grok.
Openproxy
29quangdang46/openproxy
Smart AI proxy router that connects Claude Code, Cursor, Codex, Copilot, and 50+ coding tools to 40+ AI providers with 100+ models. Saves 20-40% tokens via RTK compression, auto-fallback from subscription to cheap to free providers, multi-account round-robin, and a local dashboard.
Redactproxy
32CSPF-Founder/redactproxy
A local proxy that keeps client data out of Claude Code.
CLASP
28jedarden/CLASP
Run Claude Code with any LLM provider — drop-in proxy for OpenAI, Gemini, and more. Go.
Css Pro Tips
34PyModel/css-pro-tips
Baseline-aware modern CSS Agent Skill: small SKILL.md router + on-demand references. Claude Code, Codex, Cursor, Copilot, Gemini CLI, OpenCode, Pi, Kiro, Pythinker Code, Aider + 70 more agents.
Claudegpt
33pilc80/claudegpt
Use ChatGPT/Codex OAuth in Claude Code without an API key
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.