Your Copilot plan, one more upstream
GitHub Copilot is now a BYOK provider on AnyRouter. Requests on a Copilot route run on your own subscription and spend no AnyRouter credits. The key is encrypted at rest and never shown back.
This is the Copilot inference API. GitHub Models, the older free PAT service, was retired on 30 July 2026 and its AnyRouter routes stay disabled. If you had a Models key saved, it does not work here.
Sign in with GitHub
Open Dashboard → BYOK, add the GitHub Copilot key, and choose Sign in with GitHub. AnyRouter shows a code and a link. Enter the code at github.com/login/device and approve with the account that holds your Copilot plan. The token is filled into the form for you.
The device code stays on the server. The browser only sees the short user code, so there is nothing sensitive to copy out of a tab or a screenshot.
Or use a fine-grained token
Go to github.com/settings/personal-access-tokens. In GitHub's menus that is Settings, then Developer settings, then Fine-grained personal access tokens.
Generate a token for the resource owner that holds your Copilot plan. Under Permissions, set Copilot Requests to read-only. Copy the token and paste it into the GitHub Copilot key form.
Settings > Developer settings > Fine-grained personal access tokens
Permissions > Copilot Requests: Read-onlyClassic tokens beginning with ghp_ are rejected by GitHub. Use the fine-grained token or the sign-in flow instead.
What AnyRouter does with the token
Copilot does not accept a GitHub token as an inference key. It wants a session token that lasts about thirty minutes. AnyRouter trades your stored token for one at request time, caches it, and renews it before it expires.
Your GitHub token never reaches the inference upstream. The exchange sends the Copilot integration headers the API requires. A request fails with an actionable error if the account has no Copilot plan or the token is missing the permission.
Use it like any other model
There is no new header and no new endpoint. Send an ordinary Chat Completions request with an AnyRouter key and a model that has a Copilot route, such as openai/gpt-4o-mini.
curl https://anyrouter.dev/v1/chat/completions \
-H "Authorization: Bearer sk-ar-v1-..." \
-H "Content-Type: application/json" \
-d '{"model":"openai/gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'Your plan decides which model ids Copilot accepts. A model outside your plan returns an error from GitHub. Enterprise proxy endpoints are not supported yet; individual plans work today. Copilot keys are never pooled, so only your own requests use your subscription.
Related posts
- Bring your own keys: every provider behind one APIProductJune 28, 2026 · Connect the provider keys and subscriptions you already pay for, route them through one OpenAI-compatible URL with automatic failover, and, soon, earn credits back by donating idle quota to the shared pool.
- Bring your Antigravity credential to AnyRouterProductJuly 25, 2026 · A CLI that finds your local Antigravity credential, shows you exactly what it found, and uploads it as a BYOK key, with pool donation as a separate, explicit opt-in.
Route your first request in 2 minutes
Start free with your own keys, or top up and pay per token. Get $4/mo in credits and free models on Go — $2/mo, or free when you donate a provider key.