Claude Code model router

BYOKEY

Turn AI subscriptions into standard API endpoints. OpenAI & Anthropic compatible gateway — for Amp Code, Cursor, Factory CLI, and more.

Install

Install
brew install AprilNEA/tap/byokey

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/AprilNEA/BYOKEY.git

From the README

English | 简体中文

BYOKEY

Bring Your Own Keys
Run ChatGPT.app / Codex and Claude clients through a local gateway.
Responses supports your ChatGPT subscription, GitHub Copilot and custom upstreams; Anthropic Messages supports Copilot, Cursor, Claude and custom upstreams.

 

 

 

BYOKEY is no longer archived. The Responses gateway and native Codex HTTP forwarding are available on master.
The latest published release, v3.0.0, does not include these features. Build from source to use the ChatGPT.app / Codex quick start.

Direct Copilot access is an alternative for Claude clients that only need Copilot. Its /v1/messages endpoint accepts Claude Code's requests without BYOKEY. The Cursor backend drives Cursor's private agent protocol, which Cursor does not allow outside its own clients, and it does not hold up in Claude Code's tool loops.
To use Copilot directly (GitHub does not document this endpoint), sign in with the GitHub CLI and configure:
Claude Code — ~/.claude/settings.json

Claude Desktop — third-party inference with the gateway provider. Copilot serves no /v1/models, so list the models by full id:

The Anthropic Messages path is shown below. Responses uses the same server with separate model routing.

Features

- Responses API — /v1/responses and /codex/responses for ChatGPT.app / Codex, with model aliases, custom upstreams, and Codex model discovery at /codex/models
- Native Codex HTTP forwarding — unmatched /codex/* paths go to the configured ChatGPT backend, including image generation and editing endpoints; no WebSocket support
- Anthropic Messages API — /v1/messages, /v1/messages/count_tokens and /v1/models, as Claude Code and Claude Desktop expect them; [1m] long-context ids included
- Copilot as a Claude backend — Copilot's Anthropic-format…
Read the full README on GitHub

Details

Language
Rust
Last updated
11 October 2026
Topics
ai-gatewayampanthropic-apiclaudecopilotcursorgeminillmoauthopenai-apiproxyrust

FAQ

What is BYOKEY?

Turn AI subscriptions into standard API endpoints. OpenAI & Anthropic compatible gateway — for Amp Code, Cursor, Factory CLI, and more. It is a model router for Claude Code, from AprilNEA/BYOKEY on GitHub.

How do I install BYOKEY?

Run brew install AprilNEA/tap/byokey, then follow the setup in the README.

Is BYOKEY popular?

AprilNEA/BYOKEY has 139 GitHub stars and 26 forks. It was last updated on 11 October 2026.

More model routers & proxies

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