1. Install and authenticate with GitHub

You need Python, a GitHub account, and eligible GitHub Copilot access. ghc-api is proxy software; it does not provide models or quota.

Shell
pip install -U ghc-api
ghc-api

On first start, ghc-api checks GITHUB_TOKEN, then ~/.ghc-api/github_token.txt, and otherwise starts GitHub Device Flow. The default address is 127.0.0.1:8313.

Open GitHub Copilot Features settings ↗ to see which models your GitHub account can enable and use. Organization policy may further restrict availability.

2. Generate the config with -c

Shell
ghc-api -c

The generated configuration is stored at ~/.ghc-api/config.yaml on Linux and macOS, and under %APPDATA%\ghc-api on Windows. It contains the fields, defaults, and comments supported by the installed version. This guide deliberately avoids copying a complete YAML file that could become stale.

3. Why model mapping matters

Client model names do not always match the IDs recognized by the GitHub Copilot backend. Claude Code may send a dated ID such as claude-opus-4-8-2026xxxx, while the backend expects a stable ID without the date.

Claude CLI may also use forms such as 4-8 or 4-5, while the corresponding Copilot IDs use 4.8 or 4.5. ghc-api applies model_mappings before forwarding the request.

MappingUse
exactFixed aliases or one complete mismatched ID.
prefixDated or versioned suffixes that change while the stable prefix remains recognizable.
Mapping fixes names, not entitlement.

The target must still be available to the current GitHub account.

4. Verify the service

Shell
curl http://127.0.0.1:8313/v1/models
curl http://127.0.0.1:8313/v1/models/full/

Check GitHub login, the selected model, protocol URL, and the mapped model name shown in the dashboard.

5. Configure a client

For multiple users or remote access, continue with advanced shared-instance and security configuration.

Next step

Inspect the models and endpoints available to your account before copying a model ID into client configuration.

Inspect models and parameters →