Claude Code model router

Claude N Codex API Proxy

Claude Code and Codex API Routing Proxy

Install

From source
git clone https://github.com/jimmc414/claude_n_codex_api_proxy.git

From the README

Claude & Codex API Router

A universal HTTP proxy and Python library that automatically routes Anthropic or OpenAI API calls to local CLI tools (Claude Code or Codex) when the API key is set to all 9s, otherwise uses the real cloud APIs.

Two Solutions Included

1. Universal HTTP Proxy (Works with ANY language/tool)
An HTTP/HTTPS proxy server that intercepts Anthropic or OpenAI API calls from any application, regardless of programming language.

2. Python Library (Python-specific)
Drop-in replacements for the Anthropic and OpenAI Python clients that handle routing internally, routing to Claude Code or Codex when appropriate.

Features

- Universal Compatibility: HTTP proxy works with ANY programming language or tool
- Transparent Routing: No code changes needed for existing projects (with proxy)
- Claude Code & Codex Integration: Automatically routes to local Claude Code or Codex CLI when API key is all 9s
- API Compatibility: Maintains Anthropic/OpenAI API response format
- Easy Configuration: Just set your API key to all 9s to enable local routing
- Python Library: Drop-in replacement clients for Anthropic and OpenAI Python SDKs
- Async Support: Includes both synchronous and asynchronous clients

Installation

Make sure you have the relevant CLI installed and available in your PATH:

Quick Start

Option 1: Universal HTTP Proxy (Recommended)

1. Setup and start the proxy:

2. Configure your environment (examples):

macOS/Linux (bash/zsh):

Windows (PowerShell):

3. Use from ANY language/tool:

Allowing Additional API Endpoints

By default the proxy only permits a curated set of /v1 API paths. The default
configuration covers common Anthropic and OpenAI endpoints and falls back to
allow any path under /v1/.

To permit other endpoints you can either override the entire…
Read the full README on GitHub

Details

Language
Python
Last updated
24 November 2025

FAQ

What is Claude N Codex API Proxy?

Claude Code and Codex API Routing Proxy It is a model router for Claude Code, from jimmc414/claude_n_codex_api_proxy on GitHub.

How do I install Claude N Codex API Proxy?

Clone jimmc414/claude_n_codex_api_proxy from GitHub and follow the setup steps in its README.

Is Claude N Codex API Proxy popular?

jimmc414/claude_n_codex_api_proxy has 28 GitHub stars and 6 forks. It was last updated on 24 November 2025.

More model routers & proxies

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