GitHub Now Shows the Tokens Behind Every AI Credit
The GitHub AI usage API now breaks AI credit consumption down by token, per model, after an update GitHub announced on 2 December 2026. The three billing endpoints for enterprises, organisations and individual users return six raw token counts in each usage item, so teams can pull the detail into their own dashboards instead of downloading a report and parsing it by hand.
That sounds like a small plumbing change, and in one sense it is: no permissions change, no new endpoint, and existing callers simply start seeing extra fields. But token-level detail is where AI costs actually live. A credit total tells you what you spent; the split between input, output, image and cache tokens tells you why, and which model or workflow drove the change.
There are catches worth knowing before anyone builds on the data. Token counts generally start with usage on 1 December 2026, earlier periods return zero rather than real history, and the counts are raw, with no pricing or discount adjustments applied. Handled with those limits in mind, the update turns a billing total into something engineers and finance teams can actually investigate together.
Key takeaways
- GitHub announced on 2 December 2026 that its AI usage REST API returns per-model token counts behind AI credits.
- Each usage item now carries six raw counts: input, output, image input, image output, cache read and cache write tokens.
- The enterprise, organisation and user billing endpoints all expose the fields, respecting existing time, user and model filters.
- Token counts generally begin with usage on 1 December 2026; earlier periods return zero, which means missing data, not no usage.
- Counts carry no pricing or discount adjustments, so teams still need model rates to turn tokens into money.
| Detail | What to know |
|---|---|
| Announced | 2 December 2026, in GitHub’s changelog |
| Endpoints | Enterprise, organisation and user AI credit usage endpoints in the billing REST API |
| New fields | tokenInput, tokenOutput, tokenImageInput, tokenImageOutput, tokenCacheRead and tokenCacheWrite |
| Who can see it | Admins on Copilot Business and Copilot Enterprise, and anyone on Copilot for individuals |
| Data start | Token counts generally start 1 December 2026; earlier periods return zero |
What GitHub actually changed
The update touches the AI credit usage endpoints that already existed for enterprises, organisations and users. Each usage item in the response now includes six token counts: input tokens sent to the model, output tokens the model generated, image input and image output tokens, cached tokens read, and tokens written to the cache, with extended cache creation excluded from that last figure. GitHub says the definitions match its downloadable AI usage report, which keeps the API and the report telling the same story.
Crucially, the new fields respect the endpoints’ existing filters, such as time period, user and model. That means an admin can ask the questions that matter without exporting anything: which model consumed the most output tokens last week, whether one team’s cache reads collapsed after a workflow change, or how much of a credit spike came from image tokens rather than text. Per-model grouping is the point, because blended totals hide exactly the differences that pricing and behaviour create.
Access follows the existing rules. Token counts are available to admins on Copilot Business and Copilot Enterprise, and to anyone on Copilot for individuals checking their own usage. GitHub says existing callers need no permission changes; the fields simply appear in responses they already receive. That low-friction rollout matters, because billing data only helps if the scripts and dashboards teams already run can pick it up without a fresh approval process.
Why token detail beats a credit total
AI credits are a billing abstraction, and abstractions hide causes. When a monthly total jumps, a credit figure alone cannot say whether developers sent longer prompts, a model produced longer answers, image features took off, or caching stopped working. The six-way token split can. Input growth points at context and prompt design; output growth points at response length and agent loops; cache read and write figures show whether repeated context is being reused or paid for again and again.

That diagnostic power matters more as coding agents do longer, multi-step work. An agent that reads a repository, plans, edits and re-checks can burn tokens in patterns a chat window never would, and per-model counts let teams compare what different models actually consume on the same kind of task. It is the same cost visibility question raised by multi-agent tools generally, including the approach in Friday’s coding agents launch, where splitting work across agents multiplies the token bill unless someone is watching it.
Finance and engineering also finally get a shared unit. Credits convert to money at a fixed rate, but tokens explain behaviour, and behaviour is what teams can change. A dashboard that shows credits beside input, output and cache tokens lets a platform team spot a runaway workflow in days rather than at invoice time, and lets finance ask sharper questions than why the total rose. That is a modest API change with an outsized effect on how AI spend gets governed.
The December start date is the main trap
The biggest risk in the new data is misreading its beginning. GitHub says token counts generally start with usage on 1 December 2026, that early-access customers may have partial data from before then, and that token fields return zero for periods before capture starts. A zero for November therefore means the API did not record tokens then, not that nobody used any. Any chart that plots token volume across that boundary without marking it will invent a fake surge in December.
For token detail on earlier usage, GitHub points users to the AI usage report downloaded from billing settings. That split is awkward but understandable: the report remains the historical record, while the API becomes the going-forward feed. Teams building dashboards should store the token fields from December onward, label earlier months as no token data rather than zero, and resist backfilling history the API never captured.
Two neighbouring billing changes add to the housekeeping. Usage reports gained a user_id column on 1 December, inserted after username, which shifts every later column one place right and can silently break scripts that read reports by column position instead of header name. And from 1 January 2027, the billing usage report API returns only the past 24 months, so organisations that query older history through it should export what they need before that date. None of this is dramatic, but all of it can corrupt a cost dashboard quietly.
Raw tokens are not yet money
GitHub is explicit that the counts are raw, without pricing or discount adjustments. Turning them into cost still requires each model’s rates for input, output, image and cache tokens, plus any discounts that apply to the account. That is not a flaw so much as a boundary: the API reports consumption, and the pricing layer lives elsewhere. Teams that multiply tokens by a single blended rate will get a number that looks precise and is not.
The announcement also leaves open questions that dashboard builders will hit quickly. GitHub has not, in this update, promised calculated costs in the response, spelled out retention for token data beyond the December start, or guaranteed that every model in the usage report appears identically in the API. Those gaps do not block adoption, but they argue for validating API totals against the billing page and the downloaded report before chargeback or budgeting decisions rest on them.
Context helps here: Copilot billing has been moving toward metered, token-based models, and other vendors are making similar shifts, as seen in the changes covered in Microsoft’s Copilot harness billing update. In that world, token transparency is not a nice extra. It is the receipt that lets customers check the meter, and GitHub putting it in the API, rather than only in a downloadable report, is the right direction even if the receipt is still incomplete.
What teams should do with it now
The practical checklist is short. First, add the six token fields to any scheduled pull of AI credit usage, starting with December 2026, and mark earlier periods as missing rather than zero. Second, fix report parsers to read columns by header name and key per-person rollups on the stable user_id instead of username, which can change and disappears for deleted accounts. Third, loosen reconciliation tolerances slightly, because per-row rounding can make hand-summed totals differ in the last decimal places.
Fourth, export billing history older than 24 months before 1 January 2027 if finance or audit still queries it through the report API. Fifth, build the first dashboard around questions, not totals: input versus output mix by model, cache hit behaviour, image token share, and the heaviest users or workflows. Those views turn the new fields into decisions about prompts, model choice and agent design, which is where the savings actually are.
Individual Copilot users get a smaller version of the same benefit: a clearer view of what their own usage consists of, model by model, without downloading reports. Licence and plan changes keep reshaping what that usage costs, a theme in our explainer on Copilot without a base licence. Whatever the plan, seeing the tokens behind the credits beats guessing, and that is what this update delivers.
Frequently asked questions
What did GitHub announce on 2 December 2026?
GitHub announced that its AI usage REST API now returns a per-model breakdown of the tokens behind AI credits. The enterprise, organisation and user billing endpoints include six raw token counts in each usage item, respecting existing filters for time period, user and model.
Which token counts does the API return?
Each usage item includes tokenInput, tokenOutput, tokenImageInput, tokenImageOutput, tokenCacheRead and tokenCacheWrite. The cache write count excludes extended cache creation, and GitHub says the definitions match its downloadable AI usage report.
Who can access the token breakdown?
Token counts are available to admins on Copilot Business and Copilot Enterprise, and to anyone on Copilot for individuals checking their own usage. Existing API callers need no permission changes; the new fields appear in responses they already receive.
Why do earlier periods return zero tokens?
Token capture generally starts with usage on 1 December 2026, apart from partial early-access data. For periods before capture begins, the fields return zero, which means missing data rather than no usage. Earlier detail lives in the downloadable AI usage report.
Do the token counts include pricing or discounts?
No. GitHub says the counts are raw, without pricing or discount adjustments. Teams still need each model’s token rates, and any account discounts, to convert the counts into actual cost, so a single blended rate will mislead.
What else changed in GitHub billing data?
Usage reports gained a user_id column after username on 1 December 2026, shifting later columns, so scripts should read by header name. From 1 January 2027, the billing usage report API returns only the past 24 months, so older history should be exported before then.
Bottom line
The GitHub AI usage API update is small in surface area and large in usefulness. Six raw token counts, broken down by model and available through endpoints teams already call, turn an opaque credit total into something that can be explained, forecast and challenged. The December start date and the absence of pricing adjustments are real limits, but they are documented limits that careful dashboards can handle.
Teams that act now, storing token fields from December, fixing report parsers for the new user_id column, and exporting older history before the 24-month window arrives, will start 2027 with AI cost data they can trust. Those that wait will still have the totals. They just will not know what drove them.


