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 /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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
year | query | no | If 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. |
month | query | no | If 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. |
day | query | no | If 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. |
user | query | no | The user name to query usage for. The name is not case sensitive. |
model | query | no | The model name to query usage for. The name is not case sensitive. |
product | query | no | The product name to query usage for. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response when getting a billing AI credit usage report | yes |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 500 | Internal Error | yes |
| 503 | Service unavailable | yes |
GET /organizations/{org}/settings/billing/budgets
Gets all budgets for an organization. The authenticated user must be an organization admin or billing manager.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
page | query | no | The page number of the results to fetch. |
per_page | query | no | The number of results per page (max 100). |
scope | query | no | Filter budgets by scope type. |
user | query | no | Filter consumed amount details for budgets by the specified user login. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response when getting all budgets | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 500 | Internal Error | yes |
POST /organizations/{org}/settings/billing/budgets
Creates a new budget for an organization. The authenticated user must be an
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Budget created successfully | yes |
| 400 | Bad Request | yes |
| 401 | Requires authentication | yes |
| 403 | Insufficient permissions | yes |
| 404 | Feature not enabled or organization not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 500 | Internal server error | yes |
GET /organizations/{org}/settings/billing/budgets/{budget_id}
Gets a budget by ID. The authenticated user must be an organization admin or billing manager.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
budget_id | path | yes | The ID corresponding to the budget. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response when updating a budget | yes |
| 400 | Bad Request | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 500 | Internal Error | yes |
| 503 | Service unavailable | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
budget_id | path | yes | The ID corresponding to the budget. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Budget updated successfully | yes |
| 400 | Bad Request | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Budget not found or feature not enabled | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 500 | Internal server error | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
budget_id | path | yes | The ID corresponding to the budget. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response when deleting a budget | yes |
| 400 | Bad Request | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 500 | Internal Error | yes |
| 503 | Service unavailable | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
year | query | no | If 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. |
month | query | no | If 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. |
day | query | no | If 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. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Billing usage report response for an organization | yes |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 500 | Internal Error | yes |
| 503 | Service unavailable | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
year | query | no | If 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. |
month | query | no | If 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. |
day | query | no | If 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. |
repository | query | no | The repository name to query for usage in the format owner/repository. |
product | query | no | The product name to query usage for. The name is not case sensitive. |
sku | query | no | The SKU to query for usage. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response when getting a billing usage summary | yes |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 500 | Internal Error | yes |
| 503 | Service unavailable | yes |
GET /users/{username}/settings/billing/ai_credit/usage
Gets a report of AI credit usage for a user.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
year | query | no | If 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. |
month | query | no | If 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. |
day | query | no | If 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. |
model | query | no | The model name to query usage for. The name is not case sensitive. |
product | query | no | The product name to query usage for. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response when getting a billing AI credit usage report | yes |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 500 | Internal Error | yes |
| 503 | Service unavailable | yes |
GET /users/{username}/settings/billing/usage
Gets a report of the total usage for a user.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
year | query | no | If 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. |
month | query | no | If 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. |
day | query | no | If 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. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response when getting a billing usage report | yes |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 500 | Internal Error | yes |
| 503 | Service unavailable | yes |
GET /users/{username}/settings/billing/usage/summary
Gets a summary report of usage for a user.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
year | query | no | If 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. |
month | query | no | If 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. |
day | query | no | If 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. |
repository | query | no | The repository name to query for usage in the format owner/repository. |
product | query | no | The product name to query usage for. The name is not case sensitive. |
sku | query | no | The SKU to query for usage. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response when getting a billing usage summary | yes |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 500 | Internal Error | yes |
| 503 | Service unavailable | yes |