Claude Code model router

anthropic-proxy

Converts Anthropic API requests to OpenAI format via OpenRouter so Claude Code can use other models.

414 stars 44 forksModel routers & proxiesArchived Source

Install

Install
npx anthropic-proxy
From source
git clone https://github.com/maxnowack/anthropic-proxy.git

From the README

anthropic-proxy

A proxy server that transforms Anthropic API requests to OpenAI format and sends it to openrouter.ai. This enables you to use Anthropic's API format while connecting to OpenAI-compatible endpoints.

Usage

With this command, you can start the proxy server with your OpenRouter API key on port 3000:

Environment variables:

- OPENROUTER_API_KEY: Your OpenRouter API key (required when using OpenRouter)
- ANTHROPIC_PROXY_BASE_URL: Custom base URL for the transformed OpenAI-format message (default: openrouter.ai)
- PORT: The port the proxy server should listen on (default: 3000)
- REASONING_MODEL: The reasoning model to use (default: google/gemini-2.0-pro-exp-02-05:free)
- COMPLETION_MODEL: The completion model to use (default: google/gemini-2.0-pro-exp-02-05:free)
- DEBUG: Set to 1 to enable debug logging

Note: When ANTHROPIC_PROXY_BASE_URL is set to a custom URL, the OPENROUTER_API_KEY is not required.

Claude Code

To use the proxy server as a backend for Claude Code, you have to set the ANTHROPIC_BASE_URL to the URL of the proxy server:

License
Licensed under MIT license. Copyright (c) 2025 Max Nowack

Contributions
Contributions are welcome. Please open issues and/or file Pull Requests.
Read the full README on GitHub

Details

Language
JavaScript
Last updated
28 April 2025
Topics
anthropicclaude-codellmopenrouter

FAQ

What is anthropic-proxy?

Converts Anthropic API requests to OpenAI format via OpenRouter so Claude Code can use other models. It is a model router for Claude Code, from maxnowack/anthropic-proxy on GitHub.

How do I install anthropic-proxy?

Run npx anthropic-proxy, then follow the setup in the README.

Is anthropic-proxy popular?

maxnowack/anthropic-proxy has 414 GitHub stars and 44 forks, and is included in 1 curated Claude Code list. It was last updated on 28 April 2025.

More model routers & proxies

JoyCode2Api

218

vibe-coding-labs/JoyCode2Api

JoyCode API 代理 — 协议翻译成 Anthropic/OpenAI 兼容格式,让 Claude Code 直接调用 JoyCode支持的模型,比如GLM 5.1等

Model routers & proxies48

Unsnooze

227

saaranshM/unsnooze

Automatically resume Claude Code, Codex CLI, Grok, Qwen Code, Kimi CLI, OpenCode, and Antigravity sessions when 5-hour or weekly usage limits reset—across tmux, Zellij, VS Code, and desktop apps.

Model routers & proxies22

Agents Can Communicate

209

automatis-tools/agents-can-communicate

Messages between AI coding sessions in different vendors' clients, such as Claude Code and Codex. Local, open source, no lead agent. https://getacc.dev

Model routers & proxies

Claude Proxy

214

tingxifa/claude_proxy

这是一个部署在 Cloudflare Workers 上的 TypeScript 项目,它充当一个代理服务器,能够将 Claude API 格式的请求无缝转换为 OpenAI API 格式。这使得任何与 Claude API 兼容的客户端(例如官方的 @anthropic-ai/claude-code CLI)都能够与任何支持 OpenAI API 格式的服务进行通信,如 Google Gemini, Groq, Ollama 等。

Model routers & proxies33

Weam

224

weam-ai/weam

Web app for teams of 20+ members. In-built connections to major LLMs via API. Share chats, prompts, and agents in team or private folders. Modern, fully responsive stack (Next.js, Node.js). Deploy your own vibe-coded AI apps, agents, or workflows or use ready-made solutions from the library.

Model routers & proxies92

y-router

383

luohy15/y-router

Simple proxy that lets Claude Code work with OpenRouter.

Model routers & proxies62

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.