← All tags

Billing API Reference

Monitor charges and usage from Actions and Packages.

13 endpoints tagged billing, each listing its parameters and possible responses. Search or scroll the index below to jump to a specific endpoint.

No endpoints match your search.

Get billing AI credit usage report for an organization

GET /organizations/{org}/settings/billing/ai_credit/usage

Gets a report of AI credit usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
yearquerynoIf specified, only return results for a single year. The value of year is an integer with four digits representing a year. For example, 2025. Default value is the current year.
monthquerynoIf specified, only return results for a single month. The value of month is an integer between 1 and 12. Default value is the current month. If no year is specified the default year is used.
dayquerynoIf specified, only return results for a single day. The value of day is an integer between 1 and 31. If no year or month is specified, the default year and month are used.
userquerynoThe user name to query usage for. The name is not case sensitive.
modelquerynoThe model name to query usage for. The name is not case sensitive.
productquerynoThe product name to query usage for. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Response when getting a billing AI credit usage reportyes
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes
500Internal Erroryes
503Service unavailableyes

Get all budgets for an organization

GET /organizations/{org}/settings/billing/budgets

Gets all budgets for an organization. The authenticated user must be an organization admin or billing manager.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
pagequerynoThe page number of the results to fetch.
per_pagequerynoThe number of results per page (max 100).
scopequerynoFilter budgets by scope type.
userquerynoFilter consumed amount details for budgets by the specified user login.

Responses

StatusDescriptionHas JSON body
200Response when getting all budgetsyes
404Resource not foundyes
403Forbiddenyes
500Internal Erroryes

Create a budget for an organization

POST /organizations/{org}/settings/billing/budgets

Creates a new budget for an organization. The authenticated user must be an

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Budget created successfullyyes
400Bad Requestyes
401Requires authenticationyes
403Insufficient permissionsyes
404Feature not enabled or organization not foundyes
422Validation failed, or the endpoint has been spammed.yes
500Internal server erroryes

Get a budget by ID for an organization

GET /organizations/{org}/settings/billing/budgets/{budget_id}

Gets a budget by ID. The authenticated user must be an organization admin or billing manager.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
budget_idpathyesThe ID corresponding to the budget.

Responses

StatusDescriptionHas JSON body
200Response when updating a budgetyes
400Bad Requestyes
404Resource not foundyes
403Forbiddenyes
500Internal Erroryes
503Service unavailableyes

Update a budget for an organization

PATCH /organizations/{org}/settings/billing/budgets/{budget_id}

Updates an existing budget for an organization. The authenticated user must be an organization admin or billing manager.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
budget_idpathyesThe ID corresponding to the budget.

Responses

StatusDescriptionHas JSON body
200Budget updated successfullyyes
400Bad Requestyes
401Requires authenticationyes
403Forbiddenyes
404Budget not found or feature not enabledyes
422Validation failed, or the endpoint has been spammed.yes
500Internal server erroryes

Delete a budget for an organization

DELETE /organizations/{org}/settings/billing/budgets/{budget_id}

Deletes a budget by ID for an organization. The authenticated user must be an organization admin or billing manager.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
budget_idpathyesThe ID corresponding to the budget.

Responses

StatusDescriptionHas JSON body
200Response when deleting a budgetyes
400Bad Requestyes
404Resource not foundyes
403Forbiddenyes
500Internal Erroryes
503Service unavailableyes

Get billing premium request usage report for an organization

GET /organizations/{org}/settings/billing/premium_request/usage

Gets a report of premium request usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
yearquerynoIf specified, only return results for a single year. The value of year is an integer with four digits representing a year. For example, 2025. Default value is the current year.
monthquerynoIf specified, only return results for a single month. The value of month is an integer between 1 and 12. Default value is the current month. If no year is specified the default year is used.
dayquerynoIf specified, only return results for a single day. The value of day is an integer between 1 and 31. If no year or month is specified, the default year and month are used.
userquerynoThe user name to query usage for. The name is not case sensitive.
modelquerynoThe model name to query usage for. The name is not case sensitive.
productquerynoThe product name to query usage for. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Response when getting a billing premium request usage reportyes
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes
500Internal Erroryes
503Service unavailableyes

Get billing usage report for an organization

GET /organizations/{org}/settings/billing/usage

Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
yearquerynoIf specified, only return results for a single year. The value of year is an integer with four digits representing a year. For example, 2025. Default value is the current year.
monthquerynoIf specified, only return results for a single month. The value of month is an integer between 1 and 12. If no year is specified the default year is used.
dayquerynoIf specified, only return results for a single day. The value of day is an integer between 1 and 31. If no year or month is specified, the default year and month are used.

Responses

StatusDescriptionHas JSON body
200Billing usage report response for an organizationyes
400Bad Requestyes
403Forbiddenyes
500Internal Erroryes
503Service unavailableyes

Get billing usage summary for an organization

GET /organizations/{org}/settings/billing/usage/summary

Gets a summary report of usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
yearquerynoIf specified, only return results for a single year. The value of year is an integer with four digits representing a year. For example, 2025. Default value is the current year.
monthquerynoIf specified, only return results for a single month. The value of month is an integer between 1 and 12. Default value is the current month. If no year is specified the default year is used.
dayquerynoIf specified, only return results for a single day. The value of day is an integer between 1 and 31. If no year or month is specified, the default year and month are used.
repositoryquerynoThe repository name to query for usage in the format owner/repository.
productquerynoThe product name to query usage for. The name is not case sensitive.
skuquerynoThe SKU to query for usage.

Responses

StatusDescriptionHas JSON body
200Response when getting a billing usage summaryyes
400Bad Requestyes
403Forbiddenyes
500Internal Erroryes
503Service unavailableyes

Get billing AI credit usage report for a user

GET /users/{username}/settings/billing/ai_credit/usage

Gets a report of AI credit usage for a user.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
yearquerynoIf specified, only return results for a single year. The value of year is an integer with four digits representing a year. For example, 2025. Default value is the current year.
monthquerynoIf specified, only return results for a single month. The value of month is an integer between 1 and 12. Default value is the current month. If no year is specified the default year is used.
dayquerynoIf specified, only return results for a single day. The value of day is an integer between 1 and 31. If no year or month is specified, the default year and month are used.
modelquerynoThe model name to query usage for. The name is not case sensitive.
productquerynoThe product name to query usage for. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Response when getting a billing AI credit usage reportyes
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes
500Internal Erroryes
503Service unavailableyes

Get billing premium request usage report for a user

GET /users/{username}/settings/billing/premium_request/usage

Gets a report of premium request usage for a user.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
yearquerynoIf specified, only return results for a single year. The value of year is an integer with four digits representing a year. For example, 2025. Default value is the current year.
monthquerynoIf specified, only return results for a single month. The value of month is an integer between 1 and 12. Default value is the current month. If no year is specified the default year is used.
dayquerynoIf specified, only return results for a single day. The value of day is an integer between 1 and 31. If no year or month is specified, the default year and month are used.
modelquerynoThe model name to query usage for. The name is not case sensitive.
productquerynoThe product name to query usage for. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Response when getting a billing premium request usage reportyes
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes
500Internal Erroryes
503Service unavailableyes

Get billing usage report for a user

GET /users/{username}/settings/billing/usage

Gets a report of the total usage for a user.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
yearquerynoIf specified, only return results for a single year. The value of year is an integer with four digits representing a year. For example, 2025. Default value is the current year.
monthquerynoIf specified, only return results for a single month. The value of month is an integer between 1 and 12. If no year is specified the default year is used.
dayquerynoIf specified, only return results for a single day. The value of day is an integer between 1 and 31. If no year or month is specified, the default year and month are used.

Responses

StatusDescriptionHas JSON body
200Response when getting a billing usage reportyes
400Bad Requestyes
403Forbiddenyes
500Internal Erroryes
503Service unavailableyes

Get billing usage summary for a user

GET /users/{username}/settings/billing/usage/summary

Gets a summary report of usage for a user.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
yearquerynoIf specified, only return results for a single year. The value of year is an integer with four digits representing a year. For example, 2025. Default value is the current year.
monthquerynoIf specified, only return results for a single month. The value of month is an integer between 1 and 12. Default value is the current month. If no year is specified the default year is used.
dayquerynoIf specified, only return results for a single day. The value of day is an integer between 1 and 31. If no year or month is specified, the default year and month are used.
repositoryquerynoThe repository name to query for usage in the format owner/repository.
productquerynoThe product name to query usage for. The name is not case sensitive.
skuquerynoThe SKU to query for usage.

Responses

StatusDescriptionHas JSON body
200Response when getting a billing usage summaryyes
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes
500Internal Erroryes
503Service unavailableyes