by caozhiyuan
Universal local AI gateway & desktop app for Claude Code, Codex, OpenCode, and Antigravity (AGY) — unify GitHub Copilot, Codex, xAI, Gemini & third-party providers via OpenAI, Anthropic, and Gemini APIs.
# Add to your Claude Code skills
git clone https://github.com/caozhiyuan/copilot-apiGuides for using api integration skills like copilot-api.
See how copilot-api compares with popular alternatives.
copilot-api is an open-source api integration skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by caozhiyuan. Universal local AI gateway & desktop app for Claude Code, Codex, OpenCode, and Antigravity (AGY) — unify GitHub Copilot, Codex, xAI, Gemini & third-party providers via OpenAI, Anthropic, and Gemini APIs. It has 1,136 GitHub stars.
copilot-api's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/caozhiyuan/copilot-api" and add it to your Claude Code skills directory (see the Installation section above).
copilot-api is primarily written in TypeScript. It is open-source under caozhiyuan on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other API Integration skills you can browse and compare side by side. Open the API Integration category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh copilot-api against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM lists this project for discovery and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Copilot API is a local AI gateway that connects Claude Code, OpenCode, Codex, Antigravity CLI (agy), and other clients to GitHub Copilot, the built-in Codex and xAI providers, and third-party model providers through a unified API.
/v1/chat/completions), OpenAI Responses (/v1/responses), Anthropic-compatible Messages (/v1/messages), and Gemini REST (under /v1beta/models) from one local address.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 streams Responses over WebSocket by default and uses HTTP when useResponsesApiWebSocket is disabled./console) for Docker, NAS, and CLI deployments — manage providers, subscription quotas, API keys with USD spending limits, token usage analytics, advanced config, live logs, and coding agent setup without editing config.json by hand.Prefer a GUI? Download the Electron desktop app to sign in to GitHub Copilot, OpenAI Codex, or xAI, configure API-key providers (Kimi, DeepSeek, DashScope, OpenRouter, or a custom provider from models.dev), connect your coding agents in one click, and track subscriptions, token usage, API key spending limits, media creation, and logs in one window.
https://github.com/user-attachments/assets/c1d32e76-2e16-42a0-8599-0a4eb07ddbc4
Windows x64 (.exe), macOS Apple Silicon (.dmg), and Linux x64 (.AppImage) packages are published in GitHub Releases. See Electron Desktop App for full setup and advanced configuration.
After the initial full-package installation, subsequent updates normally use differential downloads to reduce download size. On macOS, the first update may still download a complete DMG to establish the cache. If the cache is unavailable or differential downloading fails, the app falls back to a full download.
Open the built-in Web Console at http://localhost:4141/console on the same machine as the gateway. For remote access, including Docker and NAS deployments, use an HTTPS reverse proxy such as https://gateway.example.com/console with your own domain. The console displays a warning on remote HTTP connections because the Admin Key travels in plaintext.
auth.adminApiKey from your gateway config.json (in Docker, inside the mounted /data volume). All /admin/* endpoints require a valid Admin API Key.config.json visually or in JSON with live reload, and stream gateway logs.macOS / Linux and Windows PowerShell) for Codex, Claude Code, OpenCode, DeepSeek Harness, and AGY CLI — without touching server files. To use the optional Agent Skills, run the generated environment commands before starting Codex or Claude Code.bun run start:web (or run bun run build:web once before bun run start start). For read-only token usage viewing without Admin Key access, /usage-viewer remains available as before.Use Node.js 22.x, 24.x, or 26.x with the security updates below (npx) or Bun >= 1.4.4. A Copilot subscription is needed only for the GitHub Copilot provider; other configured providers can run independently.
[!WARNING] CVE-2026-111497: The Brotli decoder in affected Node.js and Bun runtimes can corrupt memory and allow remote code execution. Upgrade Node.js 22.x to 22.23.4 or later, 24.x to 24.22.1 or later, or 26.x to 26.12.1 or later; upgrade Bun to 1.4.4 or later. Restart the gateway after upgrading. For Docker deployments, rebuild and redeploy the image with a patched runtime. See the Node.js security release and Bun security advisory.
npx @jeffreycao/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 @jeffreycao/copilot-api@latest auth login
Alternatively, run with Bun >= 1.4.4, which can offer better performance:
bunx --bun @jeffreycao/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.4). 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 Bun >= 1.4.4 or Node.js with built-in
node:sqlite(22.13.0+). Use a patched Node.js release from the warning above. See Using with npx for details.
Continue with Claude Code, OpenCode, Codex, Antigravity CLI, DeepSeek Harness, or Docker.
Codex Multi-Agent compatibility: codexMultiAgentV1 optionally advertises V1; V2 remains the default. Apply the gateway setting and start a new Codex session. Catalog refreshes do not switch an already-selected session version, and resumed sessions retain their recorded version. Explicit CLI overrides may take precedence.
Every client talks to the same local endpoint. The gateway routes each request to GitHub Copilot, the built-in codex or xai provider, or a configured third-party provider, translating between pr