npx claudepluginhub hrz6976/copilot-apiInject copilot-api rules and SubagentStart agent context
Register the copilot-api tool_search MCP bridge for Claude Code
7-day visitors to each marketplace page
Universal AI Gateway
One Gateway. Any Client. Multiple AI Providers.
Chat Completions · OpenAI Responses · Anthropic Messages
English | 简体中文
Copilot API is a local AI gateway that connects Claude Code, OpenCode, Codex, and other clients to GitHub Copilot, the built-in Codex and xAI providers, and third-party model providers through a unified API.
This is a fork of caozhiyuan/copilot-api published as
@hrz6976/copilot-api. It adds CloudGPT and Microsoft LLM API providers, including static model catalogs and automatic per-model protocol routing. Docker images and desktop app binaries are not published for this fork; build them locally if needed.
CloudGPT and Microsoft LLM API setup
/v1/chat/completions), the OpenAI Responses API (/v1/responses), and Anthropic-compatible Messages (/v1/messages) from one local endpoint.codex and xai providers, and third-party providers (Kimi, DeepSeek, DashScope, OpenRouter, OpenCode Go, Google Gemini, or a custom provider from models.dev) behind the same gateway. GitHub Copilot is optional — with at least one enabled provider, the server starts in provider-only mode without a GitHub token.codex provider uses WebSocket by default and uses HTTP when useResponsesApiWebSocket is disabled.Requires Node.js >= 22.13.0 (npx) or Bun >= 1.4.0. A Copilot subscription is needed only for the GitHub Copilot provider; other configured providers can run independently.
npx @hrz6976/copilot-api@latest start
The server listens on http://localhost:4141 by default. Optionally authenticate with GitHub Copilot or configure a third-party provider first:
npx @hrz6976/copilot-api@latest auth login
Alternatively, run with Bun >= 1.4.0, which can offer better performance:
bunx --bun @hrz6976/copilot-api start
Use --bun to select the Bun runtime and omit @latest for routine starts to reuse the cache. See Bun setup for global installation and upgrades.
[!NOTE] To trust system-installed CA certificates (for example, behind a corporate HTTPS proxy),
npxneeds no extra configuration: Node.js >= 22.19.0 merges the system CA store at startup throughtls.setDefaultCACertificates(). Only Bun requiresNODE_USE_SYSTEM_CA=1beforebunx --bun:export NODE_USE_SYSTEM_CA=1in bash/zsh, or$env:NODE_USE_SYSTEM_CA="1"in PowerShell (Bun >= 1.4.0). Desktop enables the variable for server subprocesses by default, preserving explicit environment settings.
Verify the gateway is up:
curl http://localhost:4141/v1/models
[!NOTE] Token usage storage requires Node.js >= 22.13.0 or Bun. See Using with npx for details.
Anthropic example skills
Anthropic's Claude Code plugins, installed from the claude-plugins-official repository
Ultra-compressed communication mode. Shortens prose while preserving technical terms, code, commands, and exact errors.