# Copilot API ## Docs - [Authenticate with GitHub and protect the API](https://copilot-api.nick3.top/authentication.md): Authenticate via GitHub OAuth device flow, manage multiple accounts, connect to GitHub Enterprise, and require API keys from clients. - [Configure Copilot API with config.json](https://copilot-api.nick3.top/configuration/config-file.md): Set API keys, model aliases, per-model prompts, reasoning efforts, custom providers, and logging verbosity through the config.json file. - [Environment variables for Copilot API](https://copilot-api.nick3.top/configuration/environment-variables.md): Configure GitHub token, data directory, OAuth app, enterprise URL, admin access, and proxy settings through environment variables before starting the server. - [Manage multiple Copilot accounts](https://copilot-api.nick3.top/configuration/multi-account.md): Add multiple GitHub Copilot accounts to increase combined quota and enable failover. Control request distribution with round-robin or session affinity routing. - [Monitor usage with the Admin UI](https://copilot-api.nick3.top/guides/admin-ui.md): Use the built-in web dashboard at /admin to inspect request history, account stats, and per-request details without leaving your browser. - [Install Claude Code and OpenCode plugins](https://copilot-api.nick3.top/guides/plugin-integrations.md): Install the subagent marker plugins for Claude Code and OpenCode to improve routing accuracy and preserve session identity across subagent requests. - [Control request rate limits in Copilot API](https://copilot-api.nick3.top/guides/rate-limiting.md): Use rate limiting and manual approval to avoid triggering GitHub Copilot abuse detection and stay within your subscription's usage limits. - [Troubleshoot common Copilot API issues](https://copilot-api.nick3.top/guides/troubleshooting.md): Diagnose and fix authentication failures, Admin UI access errors, token counting mismatches, and other common Copilot API problems. - [Use Copilot API with Claude Code](https://copilot-api.nick3.top/integrations/claude-code.md): Configure Claude Code to route requests through Copilot API, using your GitHub Copilot subscription as its AI backend instead of a separate Anthropic account. - [Run Copilot API with Docker](https://copilot-api.nick3.top/integrations/docker.md): Run Copilot API in a Docker container with a persistent volume for token and request history storage, supporting env-variable auth and multi-account setup. - [Use Copilot API with OpenCode](https://copilot-api.nick3.top/integrations/opencode.md): Point OpenCode at the Copilot API proxy using @ai-sdk/anthropic for Anthropic Messages semantics, reduced premium request consumption, and Claude-native beta features. - [Copilot API: GitHub Copilot as a compatible API server](https://copilot-api.nick3.top/introduction.md): Copilot API is a local proxy that exposes your GitHub Copilot subscription as an OpenAI and Anthropic compatible server for any AI coding tool. - [Quickstart: run Copilot API in minutes](https://copilot-api.nick3.top/quickstart.md): Install, authenticate with GitHub, start the proxy server, and make your first API call — everything you need to be up and running fast. - [Admin API endpoints for request inspection](https://copilot-api.nick3.top/reference/admin-api.md): Reference for the Admin API endpoints that let you query request logs, account stats, and DB metadata programmatically from your own scripts or tooling. - [Anthropic Messages API endpoints reference](https://copilot-api.nick3.top/reference/anthropic-endpoints.md): Reference for Copilot API's Anthropic-compatible endpoints: Messages, token counting, and custom provider proxy routes for Claude-native tool use. - [copilot-api auth — manage GitHub accounts](https://copilot-api.nick3.top/reference/cli-auth.md): Add, list, and remove GitHub accounts used by Copilot API. Supports multiple accounts for quota pooling, round-robin distribution, and automatic failover. - [copilot-api check-usage — view quota in terminal](https://copilot-api.nick3.top/reference/cli-check-usage.md): View GitHub Copilot usage and remaining quota in the terminal without starting the proxy. Useful before long sessions or when debugging quota exhaustion. - [copilot-api debug — show diagnostic information](https://copilot-api.nick3.top/reference/cli-debug.md): Display version, runtime details, file paths, and authentication status to diagnose configuration problems and gather information for support. - [copilot-api start — start the proxy server](https://copilot-api.nick3.top/reference/cli-start.md): Start the Copilot API proxy server on a local port. Configure the port, account type, rate limits, and Claude Code integration from a single command. - [OpenAI-compatible API endpoints reference](https://copilot-api.nick3.top/reference/openai-endpoints.md): Reference for Copilot API's OpenAI-compatible endpoints: chat completions, responses, models, and embeddings — drop-in compatible with the OpenAI SDK. - [Usage and token monitoring endpoints](https://copilot-api.nick3.top/reference/usage-endpoints.md): Reference for the /usage and /token endpoints, which let you check Copilot quota status, remaining premium requests, and the current active token.