Claude Code model router
Token Proxy
Local AI API gateway for OpenAI / Gemini / Anthropic. Runs on your machine, keeps tokens counted (SQLite), offers priority-based load balancing, optional OpenAI Chat↔Responses format conversion, and one-click setup for Claude Code / Codex.
Install
git clone https://github.com/mxyhi/token_proxy.gitFrom the README
Token Proxy English | 中文 Local AI API gateway for OpenAI / Gemini / Anthropic. Runs on your machine, keeps tokens counted (SQLite), offers priority-based load balancing, optional API format conversion (OpenAI Chat/Responses ↔ Anthropic Messages, plus Gemini ↔ OpenAI/Anthropic, including SSE/tools/images), and one-click setup for Claude Code / Codex. Default listen port: 9208 (release) / 19208 (debug builds). What you get - Multiple providers: openai, openai-response, anthropic, gemini, kiro, codex, xai - Built-in routing + optional format conversion (OpenAI Chat ⇄ Responses; Anthropic Messages ↔ OpenAI; Gemini ↔ OpenAI/Anthropic; SSE supported) - Upstream is the only scheduling unit: priority, proxy, enabled, models, and credential live on each upstream entry - No separate Accounts / Providers page — on Upstreams, use Add Account to log in or import Kiro / Codex / xAI; the same editor manages identity, quota, token refresh / auto-refresh (where the provider supports it), and routing - Account-backed upstreams: one account maps to one stable upstream; deleting it cascades account credentials; copy is disabled - Model alias mapping (exact / prefix* / wildcard*) and response model rewrite - Local access key + upstream credential injection (credential.api_keys or request-header fallback when local auth is off) - SQLite-powered dashboard (requests, tokens, cached tokens, latency, recent) - macOS tray live token rate (optional) Screenshots Quick start (macOS) 1) Install: move Token Proxy.app to /Applications. If blocked: xattr -cr /Applications/Token\ Proxy.app. 2) Launch the app. The proxy starts automatically. 3) Open Config File tab, edit and save (writes config.jsonc in the Tauri config dir). Defaults are usable; just paste your upstream API keys. Running proxies…
Details
- Repository
- mxyhi/token_proxy
- Language
- Rust
- License
- Apache-2.0
- Last updated
- 31 October 2026
- Topics
- api-key-managenmentclaude-apiclaude-codecodexopenaiopenai-apiopenai-responses-apiopencodeprovider-managementrusttauritypescript
FAQ
What is Token Proxy?
Local AI API gateway for OpenAI / Gemini / Anthropic. Runs on your machine, keeps tokens counted (SQLite), offers priority-based load balancing, optional OpenAI Chat↔Responses format conversion, and one-click setup for Claude Code / Codex. It is a model router for Claude Code, from mxyhi/token_proxy on GitHub.
How do I install Token Proxy?
Clone mxyhi/token_proxy from GitHub and follow the setup steps in its README.
Is Token Proxy popular?
mxyhi/token_proxy has 94 GitHub stars and 20 forks. It was last updated on 31 October 2026.
More model routers & proxies
Claude Code Provider Gateway
100danielalves96/claude-code-provider-gateway
The easiest way to use Claude Code with any LLM. Install the app, pick your provider, done.
ClaudeCodeProxy
97AIDotNet/ClaudeCodeProxy
Claude Code Proxy
Ocgo
100emanuelcasco/ocgo
OCGO Provides an Ollama-style CLI for running Claude Code through an OpenCode Go subscription via a local Anthropic-compatible proxy.
Openapis
95IngARodriguez/openapis
Free Claude API + free OpenAI API in one unified proxy. Drop-in compatible with Anthropic SDK, OpenAI SDK, Claude Code CLI, OpenCode, LangChain. 100+ models (Claude Opus 4.7, Sonnet 4.6, Haiku 4.5, GPT-5.5, GPT-5.4-mini, GPT-5.3-codex). Open beta — totally free.
Anthropic Proxy Rs
94m0n0x41d/anthropic-proxy-rs
A proxy server that intercepts Anthropic API requests and converts them to OpenAI-compatible format, enabling integration with dozens of inference providers such as OpenRouter, Together.ai, Novita AI, and other third-party API services. Primary use cases include Claude Code and other Claude Agent SDK-based tools.
Claude Proxy
114John-Rood/claude-proxy
Lightweight proxy that routes Anthropic API billing through Claude Code subscriptions. Zero dependencies, ~150 lines.
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.