Claude Code model router
Claude2openai Proxy
Claude API client to OpenAI API compatible API gateway/proxy. This can run Claude-Code with OpenAI API
Install
git clone https://github.com/ziozzang/claude2openai-proxy.gitFrom the README
claude-to-openai proxy Overview FastAPI proxy translating Anthropic-style /v1/messages to OpenAI via LiteLLM. Handles model mapping, content block conversion, streaming (SSE), tools, and token counting with reduced logging noise. - Original code came from: https://github.com/1rgs/claude-code-proxy - fixed for generic usages Features - Model mapping via env and prefixes (anthropic/* passthrough, openai/* normalized) - Content-block to OpenAI messages conversion (text/image/tool_use/tool_result) - SSE streaming compatible with Anthropic clients - Tool calls passthrough; converts to Anthropic tool_use blocks on response - Token counting endpoint using LiteLLM token_counter - Minimal logging with filtered noise and pretty request logs - OpenAPI schema and Swagger UI with Anthropic-compatible models and endpoint docs Run API Docs (OpenAPI / Swagger) - OpenAPI JSON: GET /_openapi.json or /openapi.json (FastAPI default) - Swagger UI: GET /docs - ReDoc: GET /redoc App metadata (title/description/version) and schema descriptions are embedded so the docs reflect the Anthropic request/response shapes and streaming behavior. Anthropic Compatibility Notes - Endpoints accept Anthropic Messages API-shaped payloads. - Streaming when stream=true returns Anthropic-style SSE events in this order: - message_start → content_block_start (text) → content_block_delta(n) → content_block_stop - optional tool call blocks: content_block_start (tool_use) → input_json_delta(n) → content_block_stop - message_delta (includes stop_reason, usage) → message_stop → final data: [DONE] - Tooling: - Request tools follow Anthropic tools[] with name, description, input_schema (JSON Schema). - Responses may include tool_use blocks for Claude-family models; for non-Claude models, tool info is…
Details
- Repository
- ziozzang/claude2openai-proxy
- Language
- Python
- License
- MIT
- Last updated
- 3 August 2025
FAQ
What is Claude2openai Proxy?
Claude API client to OpenAI API compatible API gateway/proxy. This can run Claude-Code with OpenAI API It is a model router for Claude Code, from ziozzang/claude2openai-proxy on GitHub.
How do I install Claude2openai Proxy?
Clone ziozzang/claude2openai-proxy from GitHub and follow the setup steps in its README.
Is Claude2openai Proxy popular?
ziozzang/claude2openai-proxy has 30 GitHub stars and 6 forks. It was last updated on 3 August 2025.
More model routers & proxies
Zed API
29csmsqj/zed-api
将 Zed 托管模型转为本地 OpenAI / Anthropic 兼容 API(Responses、Ch Completions、Messages),支持流式与工具调用,Codex / Claude Code / OpenCode 可直连
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.
Claude Code Forge
29TensorBlock/claude-code-forge
Setup scripts for using TensorBlock Forge with Claude Code - access any AI model through Claude's interface
Redactproxy
32CSPF-Founder/redactproxy
A local proxy that keeps client data out of Claude Code.
Gnosis
31DOMCHURCH/Gnosis
Terminal coding agent with browser UI, MCP, Obsidian memory, and live office floor. Any model via OpenRouter. MIT.
StackFerry
30Ninthless/StackFerry
Desktop provider manager and local failover router for Codex, Claude Code, and Grok.
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.