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

Terminal
$ 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.

EndpointMethodFormat
/v1/chat/completionsPOSTOpenAI Chat Completions
/v1/responsesPOSTOpenAI Responses (Codex models)
/v1/messagesPOSTAnthropic Messages
/v1/modelsGETOpenAI model list
/v1/embeddingsPOSTOpenAI embeddings
/v1/searchPOSTWeb search
/usageGETCopilot 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
FlagDescriptionDefault
-p, --portPort8787
-v, --verboseDebug loggingfalse
-a, --account-typeindividual / business / enterpriseindividual
-r, --rate-limitMin seconds between requests-
-w, --waitQueue on rate limit instead of 429false
-g, --github-tokenPass token directly-
-c, --claude-codeGenerate Claude Code launch cmdfalse
--codexGenerate Codex CLI launch cmdfalse
--manualApprove each requestfalse
--proxy-envUse HTTP_PROXY env varsfalse