One proxy. Every AI coding tool.
Route your GitHub Copilot subscription through standard OpenAI and Anthropic APIs. Works with Claude Code, Codex CLI, and anything that speaks OpenAI.
Your tool → github-router → GitHub Copilot API
$
npx github-router@latest start
click to copy
Pick your tool
Authenticate once, then connect your favorite AI coding tool.
Claude Code
Interactive setup copies a launch command to your clipboard:
npx github-router@latest start --claude-code
Or drop this in .claude/settings.json:
Codex CLI
One flag or two env vars:
npx github-router@latest start --codex
export OPENAI_BASE_URL=http://localhost:8787/v1 export OPENAI_API_KEY=dummy codex -m gpt5.2-codex
Any OpenAI Client
Point any tool at localhost:8787/v1:
curl http://localhost:8787/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4.1","messages":[{"role":"user","content":"Hello"}]}'
Claude Code settings.json
.claude/settings.json
{ "env": { "ANTHROPIC_BASE_URL": "http://localhost:8787", "ANTHROPIC_API_KEY": "dummy", "ANTHROPIC_AUTH_TOKEN": "dummy", "ANTHROPIC_MODEL": "gpt-4.1", "ANTHROPIC_DEFAULT_SONNET_MODEL": "gpt-4.1", "ANTHROPIC_SMALL_FAST_MODEL": "gpt-4.1-mini", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "gpt-4.1-mini", "DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1", "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1" }, "permissions": { "deny": ["WebSearch"] } }
API Endpoints
OpenAI and Anthropic formats, streamed or buffered. OpenAI endpoints are also available without the /v1 prefix; Anthropic uses /v1/messages only.
| Endpoint | Method | Format |
|---|---|---|
/v1/chat/completions | POST | OpenAI Chat Completions |
/v1/responses | POST | OpenAI Responses (Codex models) |
/v1/messages | POST | Anthropic Messages |
/v1/models | GET | OpenAI model list |
/v1/embeddings | POST | OpenAI embeddings |
/v1/search | POST | Web search |
/usage | GET | Copilot usage & quotas |
Docker
docker build -t github-router . docker run -p 8787:8787 -e GH_TOKEN=your_token github-router
Docker Compose
services: github-router: build: . ports: ["8787:8787"] environment: [GH_TOKEN=your_token] restart: unless-stopped
CLI
github-router start [flags] Start the proxy github-router auth Authenticate with GitHub (one-time) github-router check-usage Show Copilot usage/quotas github-router debug Print diagnostic info
| Flag | Description | Default |
|---|---|---|
-p, --port | Port | 8787 |
-v, --verbose | Debug logging | false |
-a, --account-type | individual / business / enterprise | individual |
-r, --rate-limit | Min seconds between requests | - |
-w, --wait | Queue on rate limit instead of 429 | false |
-g, --github-token | Pass token directly | - |
-c, --claude-code | Generate Claude Code launch cmd | false |
--codex | Generate Codex CLI launch cmd | false |
--manual | Approve each request | false |
--proxy-env | Use HTTP_PROXY env vars | false |