Claude Code model router

copilot-api

Turns a GitHub Copilot subscription into an Anthropic-compatible API that Claude Code can use.

4,151 stars 673 forksModel routers & proxies Source

Install

Install
npx copilot-api@latest start
From source
git clone https://github.com/ericc-ch/copilot-api.git

From the README

Copilot API Proxy

This is a reverse-engineered proxy of GitHub Copilot API. It is not supported by GitHub, and may break unexpectedly. Use at your own risk.

GitHub Security Notice:
Excessive automated or scripted use of Copilot (including rapid or bulk requests, such as via automated tools) may trigger GitHub's abuse-detection systems.
You may receive a warning from GitHub Security, and further anomalous activity could result in temporary suspension of your Copilot access.
GitHub prohibits use of their servers for excessive automated bulk activity or any activity that places undue burden on their infrastructure.
Please review:
- GitHub Acceptable Use Policies
- GitHub Copilot Terms
Use this proxy responsibly to avoid account restrictions.

Note: If you are using opencode, you do not need this project. Opencode supports GitHub Copilot provider out of the box.

Project Overview

A reverse-engineered proxy for the GitHub Copilot API that exposes it as an OpenAI and Anthropic compatible service. This allows you to use GitHub Copilot with any tool that supports the OpenAI Chat Completions API or the Anthropic Messages API, including to power Claude Code.

Features

- OpenAI & Anthropic Compatibility: Exposes GitHub Copilot as an OpenAI-compatible (/v1/chat/completions, /v1/models, /v1/embeddings) and Anthropic-compatible (/v1/messages) API.
- Claude Code Integration: Easily configure and launch Claude Code to use Copilot as its backend with a simple command-line flag (--claude-code).
- Usage Dashboard: A web-based dashboard to monitor your Copilot API usage, view quotas, and see detailed statistics.
- Rate Limit Control: Manage API usage with rate-limiting options (--rate-limit) and a waiting mechanism (--wait) to prevent errors from rapid requests.
- Manual Request…
Read the full README on GitHub

Details

Language
TypeScript
License
MIT
Last updated
10 November 2025
Topics
github-copilotopenai-apiopenai-compatible-apireverse-engineering

FAQ

What is copilot-api?

Turns a GitHub Copilot subscription into an Anthropic-compatible API that Claude Code can use. It is a model router for Claude Code, from ericc-ch/copilot-api on GitHub.

How do I install copilot-api?

Run npx copilot-api@latest start, then follow the setup in the README.

Is copilot-api popular?

ericc-ch/copilot-api has 4,151 GitHub stars and 673 forks, and is included in 1 curated Claude Code list. It was last updated on 10 November 2025.

More model routers & proxies

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