http://localhost:4141 and start using your existing Copilot subscription immediately.
Quick Start
Run the proxy in under two minutes using npx — no build step required.
Authentication
Authenticate with GitHub OAuth or provide a token directly.
Claude Code
Configure Claude Code to use Copilot as its AI backend.
OpenCode
Point OpenCode at the proxy via the Anthropic SDK provider.
API Endpoints
Full reference for OpenAI-compatible and Anthropic-compatible endpoints.
Configuration
Customize models, API keys, rate limits, and more via config.json.
How it works
Copilot API sits between your AI tools and GitHub Copilot. It translates OpenAI and Anthropic requests into Copilot API calls, handles authentication token refresh automatically, and streams responses back in the format your tool expects.Install and authenticate
Run
npx @nick3/copilot-api@latest auth to authenticate your GitHub account through the standard OAuth device flow.Start the proxy
Run
npx @nick3/copilot-api@latest start to launch the local proxy server on port 4141.Point your tool at the proxy
Set your AI tool’s base URL to
http://localhost:4141 and use any placeholder value as the API key (unless you configure API key auth).Copilot API is a reverse-engineered proxy and is not supported by GitHub. Excessive automated or bulk use of Copilot may trigger GitHub’s abuse-detection systems. Use responsibly and review GitHub’s Acceptable Use Policies.