Live
Consolidating State Health Agency Workflows with Gemini Agent SkillsAI agent database load: patterns, pitfalls, and ScyllaDB mitigationsAI agents for healthcare: deployment patterns and operational impact for cloud and DevOps teamsDesigning an Agent‑Ready Platform: Webflow’s Blueprint for Safe AI‑Generated CodeSelf‑service scaling to 5,000 GKE nodes in under five minutesStable Kubernetes Foundations Power AI Agent Workloads on Amazon EKSObject‑Level RBAC in Basin Catalog: Granular Permissions for EngineersEvidence‑Driven Trustworthy AI Models: What Engineers Need to Adjust TodayConsolidating State Health Agency Workflows with Gemini Agent SkillsAI agent database load: patterns, pitfalls, and ScyllaDB mitigationsAI agents for healthcare: deployment patterns and operational impact for cloud and DevOps teamsDesigning an Agent‑Ready Platform: Webflow’s Blueprint for Safe AI‑Generated CodeSelf‑service scaling to 5,000 GKE nodes in under five minutesStable Kubernetes Foundations Power AI Agent Workloads on Amazon EKSObject‑Level RBAC in Basin Catalog: Granular Permissions for EngineersEvidence‑Driven Trustworthy AI Models: What Engineers Need to Adjust Today
GitHub

GitHub REST API adds per-model AI token breakdown

AI SummaryPowered by AI

The GitHub AI credit usage endpoints now include raw token counts for each model. This gives engineers, SREs, and security teams direct visibility into input, output, image, and cache token activity without extra reporting steps.

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/usage
  • GET /organizations/{org}/settings/billing/ai_credit/usage
  • GET /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.
Originally published atGitHub Changelog