All stories
Development

GitHub adds per-model AI token counts to its API

Collection generally starts on December 1; earlier zeros do not prove a model was unused.

An excerpt of GitHub’s published API example shows 300 input and 120 output tokens, alongside separate cache fields.

What the API returns

On December 2, GitHub added a per-model token breakdown to its AI credit usage API. A personal-plan owner can access their own data; organization and enterprise data require appropriate permissions. The response can feed a custom report without downloading a separate file.

Each usage item has six raw counts: input and output tokens, image input and output tokens, and tokens read from and written to cache. The write count excludes extended cache creation. Counts are not adjusted for pricing or discounts and are not themselves a bill.

GitHub’s published example lists 300 input and 120 output tokens. Adding just those two categories gives 420 tokens; that number alone does not say what the customer will be charged. This is GitHub’s example, not newsroom data.

Why an older zero can mislead

GitHub says collection generally starts on December 1, 2026; early-access customers may have partial data from before then. The new fields return 0 for periods before collection starts. A zero for November can therefore mean missing data, not no requests. For earlier usage, GitHub recommends downloading the AI usage report from billing settings.

The user-level API shows usage billed to a personal account. If an organization manages and pays for the license, use the organization or enterprise API instead. GitHub says existing permissions remain unchanged; details depend on the account level.

Astra News previously examined Copilot pull-request review times and median spending. The new update concerns raw token counts in the API, not new measurements of review time.

Image license

The screenshot of GitHub’s example is distributed under the MIT License. The complete original notice follows.

MIT License

Copyright (c) 2020 GitHub

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Primary sources

GitHub’s API example shows model and token fields; the numbers are illustrative, not newsroom data. Copyright (c) 2020 GitHub, MIT; text size changed, screenshot cropped and converted to WebP. The full license notice appears at the end of the article. GitHub · REST API OpenAPI Description · Copyright (c) 2020 GitHub · MIT License · MIT · Web adaptation, WebP.

Read next

King Charles III speaks with a guest at a Buckingham Palace reception in 2023.
AI

King Charles gathers contributors to new AI principles

The Ditchley Foundation has published ten principles, including an appeal to a human over consequential decisions. They do not establish a regulatory system.

Jensen Huang speaks into a microphone at an NVIDIA GTC panel in Washington on December 2, 2026.
Technology

NVIDIA CEO Huang explains shipping restriction on Megaspeed

At the Senate hearing, NVIDIA’s chief disputed a senator’s timeline. Archive photo: Huang at an NVIDIA GTC panel in Washington on December 2, 2026.

Jeff Dean wears headphones in a file photo.
AI

Jeff Dean’s Discovery Loop raises $1.2 billion

Its founder reports more than 5,000 internal AI-agent loops but does not explain how their results were evaluated.

All stories