You can now get a per-model breakdown of the tokens behind your AI credits from the GitHub REST API. The following AI credit usage endpoints return token counts:
- Enterprise: GET /enterprises/{enterprise}/settings/billing/ai_credit/usage
- Organization: GET /organizations/{org}/settings/billing/ai_credit/usage
- User: GET /users/{username}/settings/billing/ai_credit/usage
Each usage item includes six raw token counts, without pricing or discount adjustments:
- tokenInput: Input tokens sent to the model
- tokenOutput: Output tokens generated by the model
- tokenImageInput: Image input tokens sent to the model
- tokenImageOutput: Image output tokens generated by the model
- tokenCacheRead: Cached tokens read by the model
- tokenCacheWrite: Tokens written to the cache, excluding extended cache creation
The counts use the same definitions as the AI usage report, so you can pull token detail into your own dashboards and tools without downloading a report. They also respect the endpoints' existing filters, such as time period, user, and model.
If you already use the enterprise, organization, or user endpoints, the new fields appear in your responses with no changes to permissions. Token counts are available to admins on Copilot Business and Copilot Enterprise, and to anyone on Copilot for individuals.
Token counts generally start with usage on December 1, 2026. Customers with early access may have partial data from before that date. For periods before capture starts, token fields return 0. To see token detail for earlier usage, download the AI usage report from the AI usage page in your billing settings.
For more information, see the billing usage REST API documentation for enterprises and the billing usage REST API documentation for organizations and personal accounts.