# Copilot API

Copilot API is a local AI gateway that exposes GitHub Copilot, a built-in Codex provider and configurable third-party model providers through one OpenAI- and Anthropic-compatible endpoint, so tools such as Claude Code, OpenCode and Codex can all talk to the same local server.

Copilot API is a local AI gateway that connects clients such as Claude Code, OpenCode and Codex to GitHub Copilot, a built-in Codex provider, and third-party model providers including Kimi, DeepSeek, DashScope and OpenRouter, through one unified endpoint. It serves OpenAI-compatible Chat Completions, the OpenAI Responses API, and Anthropic-compatible Messages, with streaming support on all three.

A GitHub Copilot subscription is only needed to use the Copilot provider; with at least one other provider configured, the server starts in a provider-only mode without a GitHub token. It ships first-class setup for Claude Code, OpenCode and Codex, including an interactive launcher, and an Electron desktop app for signing in, configuring providers, and viewing token usage and logs. It runs with Node.js or Bun and listens locally on port 4141 by default.

Website: https://caozhiyuan.github.io/copilot-api/
