GitHub has extended its AI credit usage REST endpoints to return a per‑model token breakdown, exposing six raw token counters for each request. Practitioners can now pull detailed token metrics directly from the API, eliminating the need to download separate usage reports for most scenarios.
New fields in the usage endpoints
The following endpoints now embed the additional token properties:
GET /enterprises/{enterprise}/settings/billing/ai_credit/usageGET /organizations/{org}/settings/billing/ai_credit/usageGET /users/{username}/settings/billing/ai_credit/usage
Each usage item now contains six raw counts:
- tokenInput – tokens sent to the model
- tokenOutput – tokens generated by the model
- tokenImageInput – image‑related input tokens
- tokenImageOutput – image‑related output tokens
- tokenCacheRead – cached tokens read
- tokenCacheWrite – tokens written to the cache (excluding extended cache creation)
The counts follow the same definitions used in the AI usage report, and they respect existing filters such as time period, user, and model.
Operational impact
Because the fields appear in the response without any permission changes, existing automation that calls these endpoints can start consuming the new data immediately. Admins on Copilot Business and Copilot Enterprise, as well as all users on Copilot for individuals, can see the counts. Token data is available from December 1 2026 onward; earlier periods return zero and require a manual report download for historical detail.
Practitioners can integrate the raw token metrics into monitoring dashboards, cost‑allocation scripts, or capacity‑planning tools. Since the values are unadjusted for pricing or discounts, any cost calculations must apply the appropriate pricing model separately.
Security and audit considerations
Exposing raw token counts provides a finer‑grained view of AI workload consumption, which can be useful for audit trails and usage anomaly detection. The data does not include pricing adjustments, so it does not reveal discount structures. Teams should ensure that only authorized roles (as defined by Copilot Business/Enterprise admin policies) have access to the endpoints, as the token metrics could be used to infer workload patterns.
Related CloudNinjas coverage: AI engineering.
What This Means For Practitioners
- Update existing scripts that query AI credit usage to capture the new
token*fields. - Adjust cost‑model calculations to apply pricing on top of the raw counts.
- Leverage the breakdown for more precise capacity planning and alerting on unexpected token spikes.
- Validate that role‑based access to the endpoints aligns with your organization’s audit requirements.
- Plan for the December 1 2026 start date; use the downloadable AI usage report for any earlier data you need.
