> For the complete documentation index, see [llms.txt](https://docs.revenium.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.revenium.io/track-and-control-costs/analyze-ai-tooling-spend/setup-copilot.md).

# Setup GitHub Copilot

Revenium tracks GitHub Copilot Business and Enterprise usage by syncing data from the GitHub Copilot Metrics and Billing APIs. Setup is through the Revenium dashboard, where the backend handles syncing automatically.

## Requirements

* GitHub Copilot Business or Enterprise active on your organization
* A GitHub personal access token owned by an organization owner:
  * Fine-grained (recommended) — organization permissions **Organization Copilot metrics** (read-only) and **Administration** (read-only). Generate at <https://github.com/settings/personal-access-tokens>; an organization owner must approve the token before it starts working.
  * Classic — the `admin:org` and `manage_billing:copilot` scopes. Generate at <https://github.com/settings/tokens>.
* "Copilot usage metrics" policy enabled in your GitHub organization settings (Settings > Copilot > Policies)
* Revenium account with access to the Providers page

## 1. Add GitHub Copilot as a provider

1. In the Revenium dashboard, go to **Connections > Providers**.
2. Select **GitHub Copilot** from the list of available providers.
3. Enter your **Personal Access Token** — the fine-grained or classic GitHub token described under Requirements.
4. Enter your **Organization** — the GitHub organization slug that owns the Copilot seats, as it appears in the organization URL (for example `acme`, not `Acme Corp`).
5. Save the configuration.

Once saved, Revenium refreshes Copilot usage data automatically once daily. No CLI installation or local configuration is required.

{% hint style="info" %}
**One credential, per-developer detail.** Copilot metering reads GitHub's Metrics and Billing APIs, so a single organization credential covers everyone and individual developers install nothing. Each developer's spend is an estimate: their daily AI-credit usage priced at the rate on that day's invoice, or at GitHub's published $0.01 per credit when the invoice does not show a single rate. Treat your GitHub invoice as the financial record. Spend GitHub does not attribute to a developer, and any organization discount, appear as separate organization-level lines. GitHub can restate a day for up to 30 days, so recent figures may change. Developers appear under their GitHub handle until a corporate email address is mapped to it.
{% endhint %}

## 2. Verify data is flowing

Saving the credential triggers an immediate historical import covering up to the last 90 days, depending on the data available for your organization. Current usage arrives on two delays that stack: GitHub aggregates Copilot metrics with an approximately **24-hour delay**, and Revenium refreshes the Copilot provider **once daily**. Expect today's numbers tomorrow.

Check **AI Assistants > Copilot** in the dashboard to confirm usage data is appearing.

## Troubleshooting

### No data appears after adding the provider

GitHub's own 24-hour aggregation delay plus a daily refresh means an empty first day is expected. If nothing shows after 24 hours:

1. Confirm the token carries the permissions listed under Requirements. A token missing either one cannot read the metrics API. Tokens cannot be inspected after saving — replace it in **Connections > Providers > GitHub Copilot** by entering a new token and re-entering the organization slug.
2. Confirm the **"Copilot usage metrics" policy** is enabled for your organization under **Settings > Copilot > Policies**. With the policy off, GitHub returns no metrics even to a correctly-scoped token.
3. Confirm the organization slug is correct and that the org has Copilot **Business or Enterprise** active — usage metrics are not available on individual plans.

### GitHub token rejected

* The token must start with `ghp_` (classic) or `github_pat_` (fine-grained).
* Regenerate it and update it in **Connections > Providers**, entering the new token and the organization slug together — a blank organization is rejected.
* A token that has expired or had its organization access revoked fails the same way as a mis-scoped one.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.revenium.io/track-and-control-costs/analyze-ai-tooling-spend/setup-copilot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
