AIFeed

Per-model token breakdown in the AI usage REST API

Summary

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 filt…

Original text(via GitHub Changelog)

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.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by GitHub Changelog
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗