, 8 min read, by

GitHub Copilot AI Credits: Understand Usage and Set Budgets That Work

Since June, GitHub Copilot bills in AI credits. How the pool and budgets interact, and how to set a limit via the REST API that actually stops spending.

Since 1 June 2026, GitHub Copilot has billed by AI credits consumed instead of premium requests; the only exceptions are annual Pro and Pro+ subscriptions that stayed on premium requests. For organisations, the surprises sit in two defaults: paid additional usage is allowed out of the box, and an organisation budget stops nothing by default, it only reports the overrun by email. Below I describe how the pool and budgets interact and how to set a limit via the REST API that actually takes effect.

What AI credits cost

Credits, pool and the monthly boundary

One AI credit costs 0.01 USD. Tokens are billed at the price of the model used: according to the price table, Claude Sonnet 4.6 costs 3.00 USD per million input tokens and 15.00 USD per million output tokens, GPT-5.4 nano 0.20 and 1.25 USD. One million output tokens with Sonnet therefore equals 1,500 credits. Copilot Business costs 19 USD per user and month and includes 1,900 credits, Enterprise 39 USD and 3,900 credits; the included credits match the licence price exactly. They go into a shared pool; in the docs' example, 100 Business users share 190,000 credits. The pool refills on the first of the month at 00:00 UTC, and leftovers expire. For individual plans such as Pro (1,500 credits) and Pro+ (7,000), part of that is a variable flex allotment.

What counts and what doesn't

Code completions and next edit suggestions cost no credits. Chat, the CLI, the cloud agent, Spaces, Spark and third-party coding agents consume them. A code review is billed in two ways: the tokens in credits, the runtime in GitHub Actions minutes, which a credit budget does not cover; how a workflow job runs on a GitHub-hosted runner is shown in the post on GitHub Actions with .NET and GHCR. There is no free fallback model any more; according to GitHub's FAQ, free models are no longer part of the offering.

Which budget applies when

User budgets always stop

GitHub checks every request in a fixed order: first a user budget, then the pool, then the budget of the cost center, the organisation or the enterprise. Whichever has the least headroom blocks. User budgets exist universally for all licensed users, per cost center, or for individual people. They already count credits drawn from the pool and always stop hard; 0 USD blocks immediately. Without such limits, according to the docs, a single heavy user or an automated agent session can use a disproportionate share of the pool early in the month, a concern for example with agents as in the post on AI coding agents in Docker sandboxes. The docs say the universal user budget should be above the value of one licence, so above 19 USD for Business, so that heavy users can draw on other users' unused portions.

Organisation budgets only brake with the stop option

Budgets for the organisation, cost center and enterprise only take effect once the pool is empty, and they only limit paid additional usage at 0.01 USD per credit. Their option "Stop usage when budget limit is reached" is off by default; without it, costs keep accruing and you only get an email. Only with the stop option is the maximum bill licence fees plus budget, in the docs' example 400 × 19 USD plus 5,000 USD, i.e. 12,600 USD. If you want to pay nothing beyond the pool at all, turn off the "AI credits paid usage" policy, which is on by default, in the AI Controls settings.

Control applies when the limit is reached
User budget (universal, cost center, individual) in the pool and paid phase always a hard stop
Budget for organisation, cost center, enterprise only once the pool is empty stop only with the option, by default email only
"AI credits paid usage" policy off as soon as the pool is empty blocked until the next billing cycle

A budget only counts from the moment it is created; according to the docs, additional usage in the first billing cycle can therefore exceed the budget, even with the stop option enabled.

Creating budgets via the REST API

Organisation budget with stop

For the API I use a fine-grained token with the organisation permission "Administration", with write access for creating, as the REST reference lists it for these endpoints. A docs tutorial does claim that the usage endpoints do not support fine-grained tokens and asks for a classic one; it does not say which scope that would need. Only organisation admins and billing managers may create budgets. The gh example in another GitHub tutorial passes budget_alerting as JSON text with -f; according to the gh manual, however, -f sends strings, and -F only converts true, false, null and integers. I therefore send the body as a file:

{
  "budget_amount": 500,
  "prevent_further_usage": true,
  "budget_scope": "organization",
  "budget_entity_name": "",
  "budget_type": "BundlePricing",
  "budget_product_sku": "ai_credits",
  "budget_alerting": {
    "will_alert": true,
    "alert_recipients": ["<LOGIN>"]
  }
}
# org-budget.json as above; GH_PAT = fine-grained token
curl -sL -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $GH_PAT" \
  -H "X-GitHub-Api-Version: 2026-03-10" \
  "https://api.github.com/organizations/<ORG>/settings/billing/budgets" \
  --data-binary @org-budget.json

The amount is a whole-dollar USD value, here 500 as in the organisation example of the API docs. BundlePricing with ai_credits covers all SKUs that consume credits, including the cloud agent and Spark. prevent_further_usage is the stop, will_alert turns on the alerts, which according to the docs go to owners and billing managers by default.

User budgets and the misleading 400 error

The universal user budget has the scope multi_user_customer; according to the specification, prevent_further_usage must then be true, and alerts cannot be set up for user budgets via the API. The 30 USD from the user example in the API docs is above the 19 USD of a Business licence:

{
  "budget_amount": 30,
  "prevent_further_usage": true,
  "budget_scope": "multi_user_customer",
  "budget_entity_name": "",
  "budget_type": "BundlePricing",
  "budget_product_sku": "ai_credits",
  "budget_alerting": {
    "will_alert": false,
    "alert_recipients": []
  }
}

For a single person the scope is user, with the additional field "user": "<LOGIN>". If it is missing, the API answers like this, according to the docs:

HTTP 400: Missing required fields: budget_entity_name

The message names the wrong field: according to the docs, budget_entity_name may stay empty for user budgets; what is missing is not budget_entity_name but user.

Analysing usage

AI credit report via the API

Reading only needs "Administration" with read access. Without year and month the endpoint returns the current month; the last 24 months are available:

curl -sL \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $GH_PAT" \
  -H "X-GitHub-Api-Version: 2026-03-10" \
  "https://api.github.com/organizations/<ORG>/settings/billing/ai_credit/usage?year=2026&month=10" \
  | jq -r '.usageItems[] | [.model, .grossQuantity, .netAmount] | @tsv'

grossQuantity counts the credits (unit credits according to the specification's example), and netAmount corresponds to net_amount in the CSV report below, i.e. the amount after deducting the included usage.

CSV report from the UI

Under Settings, Billing & Licensing, Usage and AI usage, organisation owners see no per-person values. For that there is "Get usage report": the report arrives as a link by email that expires after 24 hours, and it sums by date, model and user. discount_amount shows the part covered by the included credits, net_amount the billed amount.

Questions about AI credits

What do users see when a budget takes effect?

Features that consume credits are blocked, without falling back to a cheaper model; completions and next edit suggestions keep working. Business and Enterprise users see a banner on GitHub.com through which they can request more budget. In VS Code, a user reported this text in issue #321720: "You've reached your credit limit. To continue working, please contact your organization's Copilot admin or wait until your credits reset on June 30, 2026 at 5:00 PM."

Does this also apply to Microsoft 365 Copilot?

No, AI credits concern GitHub Copilot. Microsoft 365 Copilot is a different product; more on introducing it is in the post on Microsoft 365 Copilot in the company.

What happens to premium requests and old budgets?

Premium requests now only apply to annual Pro and Pro+ subscriptions that stayed on them; when those end, Copilot Free follows. GitHub converted existing premium request budgets into AI credit budgets automatically. GitHub does not state a conversion factor. The explanatory pages on premium requests sit in the legacy section of the docs; the REST reference still lists the premium_request/usage endpoints and the premium_requests SKU alongside.

Official docs and changelog

Billing and budgets

The switch is described in the changelog of 1 June 2026; details are in billing for organisations, the budget levels, the guide to budgets and the model price table.

REST API

Fields and permissions are in the reference for budgets and usage reports. If you want to define budgets, policies and model choice for your team, I can support you as part of my AI consulting.

Note: The articles on this blog are produced with the help of AI and are editorially reviewed before publication. Editorial responsibility lies with Emre Yurtbay (see the legal notice).

Let's talk

In a free initial consultation, you describe your situation to me. I will give you an initial assessment of how I can support you.

Request a free initial consultation