GitHub Copilot API Bridge | Generated by AI
You’ve landed on ericc-ch/copilot-api, a GitHub project that transforms GitHub Copilot into a local API server compatible with OpenAI and Anthropic (e.g., Claude) APIs.
Here’s a clearer breakdown—no tables, just straight talk:
What’s This?
-
It’s a reverse-engineered proxy that lets you interact with GitHub Copilot using familiar OpenAI-style endpoints like
/v1/chat/completions
,/v1/models
, and/v1/embeddings
. You can also use Anthropic-compatible endpoints such as/v1/messages
(GitHub). -
Essentially, this lets tools that support OpenAI or Anthropic APIs—like Claude Code—use GitHub Copilot as their backend (GitHub).
Key Features
- OpenAI & Anthropic Compatibility: Works like the real OpenAI or Anthropic API (GitHub).
- Claude Code Integration: Ready to plug into Claude Code with a
--claude-code
flag (GitHub). - Usage Dashboard: Monitor your Copilot API usage and quotas via a built-in web interface (GitHub).
- Rate Limiting & Approval Controls: Includes options for rate-limiting (
--rate-limit
), auto-waiting (--wait
), manual approval (--manual
), and debugging (showing tokens)—great for avoiding GitHub’s abuse systems (GitHub). - Supports Various Copilot Plans: Individual, business, or enterprise accounts all work (GitHub).
Setup & Usage
- Prerequisites: You’ll need Bun (≥ 1.2.x) and a GitHub Copilot subscription (GitHub).
-
Installation Options:
-
Command Structure:
start
: Launches the API server (handles auth if needed).auth
: Triggers GitHub login without running the server.check-usage
: Outputs current Copilot usage in your terminal.debug
: Shows diagnostic info (versions, auth status, etc.), with optional--json
output (GitHub).
Real-World Feedback
Reddit users have chimed in:
“This project lets you turn copilot into an openai compatible endpoint.” (Reddit) “It is an awesome project to make your …” (Reddit)
Important Caveats
- Unofficial & Unsupported: This is not an official GitHub product and could break anytime (GitHub).
- Risk of Abuse Detection: Heavy or automated usage might trigger GitHub’s abuse protection and could suspend your Copilot access (GitHub).
- Potential Rate-Limit Issues: Some users have reported errors like
421 Misdirected Request
, and the maintainer paused development while investigating (GitHub).
Summary (No Tables Needed)
- What It Does: Exposes GitHub Copilot as if it were an OpenAI/Anthropic API.
- Why That Matters: Makes Copilot usable in tools expecting those APIs—like Claude Code.
- How to Use It: Install via Docker or npx; run commands to start, authenticate, or monitor usage.
- Proceed With Caution: It’s handy, but unofficial, and GitHub’s rate-limits or security safeguards may trip up heavy use.
Let me know if you’d like help setting it up, or are curious about integrating it into a specific project or tool!