Skip to content
All posts

Use your Copilot plan through AnyRouter

Sign in with GitHub or bring a fine-grained token with Copilot Requests. AnyRouter renews the short-lived Copilot session and charges no credits.


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.

terminal
Settings > Developer settings > Fine-grained personal access tokens
Permissions > Copilot Requests: Read-only

Classic 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.

terminal
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

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.