TL;DR: Since 1 June 2026, Copilot usage consumes GitHub AI credits, priced on input, output and cached tokens. So two developers with the same seat can now cost very different amounts. GitHub gives you the pieces: an AI credit usage endpoint you can filter by user and model, a seat list with the assigning team, team membership, and, on Enterprise, cost centers. This guide joins them into cost per user and per team, with example API calls. You are right to build it yourself. The last section covers what Costory does if you would rather not maintain it.
What changed in Copilot billing
GitHub moved every Copilot plan to usage-based billing on 1 June 2026 (GitHub blog, 27 Apr 2026). Premium requests were replaced by GitHub AI credits, consumed by token usage at each model's listed rate.
For Copilot Business and Enterprise, a few details matter for cost allocation:
Each seat still has a monthly price, and it includes a monthly allotment of AI credits.
Included credits are pooled across the business, so one heavy user can draw on credits a light user did not spend.
Code completions and Next Edit suggestions do not consume AI credits.
Admins can set budgets at the enterprise, cost center and user levels.
So "cost per user" now has two parts: the seat, and the AI credits that user consumed beyond, or inside, the pool.
Where the cost data lives
What you need | Where GitHub exposes it | Grain |
|---|---|---|
AI credit cost per user and model |
| Year, month or day |
Seat cost and all paid products |
| Product and SKU |
Who has a seat, and which team assigned it |
| Seat |
Team membership |
| User and team |
Activity, not cost | Copilot usage metrics reports ( | User and day |
Per-user CSV, no code | AI usage report, downloaded from the billing pages | Date, model and user, up to 31 days |
Enterprise accounts have the same billing endpoints under /enterprises/{enterprise}/settings/billing/..., plus an organization filter and a cost_center_id filter (GitHub REST docs).
Before you call the API
Org-level billing reports need an organization owner or billing manager. Enterprise-level reports need an enterprise administrator or billing manager (GitHub docs).
The billing usage endpoints do not support fine-grained personal access tokens. Use a personal access token (classic), kept in an environment variable, never in the script.
The seat list needs the
manage_billing:copilotorread:orgscope, and only organization owners can see assigned seats (GitHub docs).GitHub's billing reference uses the
X-GitHub-Api-Version: 2026-03-10header.
Step 1: AI credit cost per user and per model
The AI credit usage endpoint returns usageItems with, for each product, SKU and model: grossQuantity, grossAmount, discountAmount, netQuantity and netAmount (GitHub REST docs). Filter by user to get one developer's usage.
How to read the amounts, per GitHub's billing reference (docs):
grossAmountis the usage at list rate.discountAmountis the part covered by included usage, which is where pooled credits show up.netAmountis what gets billed:grossAmount - discountAmount.
For chargeback, decide once which number you allocate. Gross shows who consumed what. Net shows who caused the overage. With pooled credits, the two can point at different people.
Step 2: the list of seated users, with their team
The seat list gives you every billed seat, the user, and assigning_team when the seat came from a team (GitHub REST docs). It is paginated, up to 100 per page.
If seats are assigned user by user, assigning_team is empty. Use your team membership instead: GET /orgs/{org}/teams/{team_slug}/members for each team (GitHub REST docs), or the daily user-teams report described in step 4.
Step 3: join, then roll up by team
Loop over the seated users, pull their AI credit usage for the month, and keep the team next to each row.
copilot_cost_by_user.tsv is your cost per user and per model. The awk step gives cost per team. Add the seat cost on top: take it from the usage summary for the Copilot product, and split it by seat. Check the SKU names in your own response rather than hard-coding them.
Two rules to settle before the numbers go to finance:
A user in several teams. Pick a primary team, or the cost is counted twice.
Users who left. They keep their usage history but drop out of today's team list. Freeze the user-to-team mapping per month.
Step 4: Enterprise shortcuts, cost centers and user-teams reports
On GitHub Enterprise Cloud, cost centers do part of the join for you. A cost center can hold organizations, repositories, users and enterprise teams, and each resource belongs to one cost center at a time (GitHub docs). Assign an enterprise team to a cost center and membership stays current as people join or leave. Then filter the enterprise AI credit endpoint with cost_center_id. An ID of none returns usage with no cost center, which is your unallocated bucket.
For activity next to cost, the Copilot usage metrics API publishes daily NDJSON reports: users-1-day for per-user activity and user-teams-1-day for team membership on that day (GitHub docs). Teams with fewer than 5 seated Copilot users are left out of the user-teams report. These reports measure activity, not money, but they are what you need for cost per active user.
No-code option: the AI usage report
If you need the numbers once, not every month, the billing pages let you download an AI usage report: a per-user breakdown of AI credits by date, model and user, with input, output and cache tokens, for up to 31 days (GitHub docs). It arrives by email. Map the username column to teams in a spreadsheet and you have a first chargeback.
Where Costory fits
The scripts above work, and a platform engineer with Claude can have them running in an afternoon. Claude plus a billing API works for one person. The upkeep is the part that grows: new hires, team changes, pooled credits, and a Copilot line that finance wants next to Cursor, Claude Code and the cloud bill.
Costory is a FinOps agent that does that plumbing:
It reads GitHub Copilot spend per developer, per team and per model.
You map developers to teams once, and the same
teamdimension covers Copilot, Cursor, Claude Code, your LLM APIs and your cloud (dimensions).Copilot sits in the same cost model as the rest of your bill, so "AI coding spend per team" is one number, not four exports (AI tools spend).
It answers in Slack and in Claude through MCP: "which teams' Copilot spend grew fastest this month, and on which models?" (MCP).
Costory recommends, your teams act. If a team leans on an expensive model where a cheaper one would do, the agent says so with the numbers. Your engineers make the change. The connection is read-only.
To connect GitHub Copilot to Costory, talk to a human.
Related: AI tools spend, AI coding spend per developer, Costory in GitHub Copilot, GitHub Copilot cost.
Frequently asked questions
How do I get GitHub Copilot cost per user?
Call GET /organizations/{org}/settings/billing/ai_credit/usage with the user parameter for each seated user, or download the AI usage report from the billing pages. Add each user's share of the seat cost on top.
Can I get Copilot cost per team?
GitHub does not publish a cost-per-team report. Join per-user cost to team membership: the seat list's assigning_team, the team members endpoint, or the user-teams report. On Enterprise Cloud, cost centers with enterprise teams give you a team filter on billing usage directly.
Do code completions consume AI credits?
No. According to GitHub, code completions and Next Edit suggestions stay included in all plans and do not consume AI credits.
Are the Copilot usage metrics the same as cost?
No. The usage metrics reports measure activity per user and per day. Cost comes from the billing usage endpoints. Use both if you want cost per active user.
Sources
Checked on 26/11/2026.
GitHub Copilot is moving to usage-based billing, GitHub blog, 27 Apr 2026
REST API: billing usage and enterprise billing usage, GitHub docs
Automating usage reporting with the REST API, GitHub docs
Billing reports reference, GitHub docs
REST API: Copilot user management, GitHub docs
REST API: team members, GitHub docs
REST API: Copilot usage metrics and team-level Copilot usage metrics, GitHub docs
Using cost centers to allocate costs, GitHub docs

Put this into practice with your own cost data
30-day free trial. Plans from €250/month, billed annually. We recommend Team (€600/month) once more than one team uses Costory.
First optimization recommendation
The next day
PRICE
From 250€/month, never a % of your bill
Data residency
EU
Access
Read-only on your cloud
From 250€/month, never a % of your bill. 30 days free, no credit card.
