---
title: "Get a budget"
method: GET
path: "/v1/ai-cost-management/budgets/{budgetId}"
tags: ["budgets"]
---

# Get a budget

`GET /v1/ai-cost-management/budgets/{budgetId}`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v1/ai-cost-management/budgets/{budgetId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Returns one of the organization's budgets. If the organization has no budget with this identifier that the caller can see, or the identifier isn't a valid UUID, the request fails with `404`.

## Path parameters

- `budgetId` string, uuid, required

## Response `200`

The budget.

- union: A budget sets a spending limit, or declares an exemption from limits, for part of the organization's AI usage. `scope` selects the usage it covers. `effect` tells the two kinds apart. A limit budget carries its settings in `limit`, `window`, and `posture`, and an exemption carries the period it covers in `validity`. The fields of the other kind are `null`.
  - AICostLimitBudget: A limit budget sets a spending limit on the usage in its scope for each budget window. It has a balance, and it can have a notification rule that alerts as spend reaches shares of the limit.
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `name` string, required: A human-readable name for the budget.
    - `labels` Labels, required: Key-value metadata on the budget. The budget list can filter by label. Balances and notification rules ignore labels.
    - `managed_by` ManagedBy, required: Identifies the tool that manages this resource, such as `{"tool": "terraform-provider-konnect"}`. The service stores the value and never acts on it.
    - `scope` object, required: The usage the budget covers.
      - `filters` AICostBudgetScopeFilter[], required: The filters that select the usage the budget counts. Usage must match every filter. An empty list covers all of the organization's usage.
        - union: One filter in a budget scope: a predicate on one usage field, or a group that combines filters with `and` or `or`.
          - union: A condition on one usage field. `op` selects the comparison and the shape of `value`: one value, a list of values, or `null` for `exists` and `nexists`. Usage without a value for the field matches only `nexists`.
            - AICostBudgetScopeValuePredicate: A predicate that compares a usage field with one value, using `eq`, `neq`, or `contains`.
              - …
            - AICostBudgetScopeValueListPredicate: A predicate that compares a usage field with a list of values, using `in`, `nin`, or `ocontains`.
              - …
            - AICostBudgetScopeExistsPredicate: A predicate that matches usage with any value for a field.
              - …
            - AICostBudgetScopeNExistsPredicate: A predicate that matches usage without a value for a field.
              - …
          - AICostBudgetScopeFilterGroup: A group of filters combined with `and` or `or`. A group's filters can include further groups.
            - `op` 'and' | 'or', required: How the group combines its filters: `and` requires every filter to match, and `or` requires at least one. Usage that matches several filters of an `or` counts once.
            - `filters` AICostBudgetScopeFilter[], required: The filters to combine, each a predicate or a nested group.
      - `each` union, required: The field that splits the budget. With `each`, the limit applies separately to every value of that field, such as each subject. Each value gets its own derived budget, and usage without a value for the field belongs to none of them. A fixed usage field or `tags.<key>`. `null` for a pooled budget, whose limit applies to all its usage together, and always `null` on an exemption.
        - 'subject_type' | 'subject' | 'subject_id' | 'group' | 'team' | 'model' | 'provider' | 'request_mode': A usage field that a budget scope can filter on, and that `each` can split a budget by: - `subject`: the subject reference, such as `principal/{uuid}`. Equal identifiers from different identity systems stay distinct. - `subject_id`: the subject's identifier without its type, which pools equal identifiers across identity systems. - `subject_type`: the subject's identity system: `principal`, `consumer`, or `oidc`. - `group`: the usage's group references. Usage can carry several groups. `eq` and `in` match when any of them matches. `neq` and `nin` match only usage with at least one group, and exclude it when any of its groups matches. - `team`: the usage's Kong Identity team references, with the membership rules of `group`. - `model`: the model that the provider reports as served. - `provider`: the provider that served the invocation. - `request_mode`: how the invocation was served: `stream`, `oneshot`, or `realtime`. A scope can also use `tags.<key>` for the value of one tag.
        - string
    - `priority` integer, required: The budget's priority, from 1 (highest) to 100 (lowest). You can filter and sort the budget list by it.
    - `created_by` string, uuid, nullable, required: The `id` of the user or system account that created the budget, which the server records. A person with a budget of their own can replace and delete only the budgets they created. `null` for a budget created before the service recorded creators.
    - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
    - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.
    - `effect` 'limit', required: Always `limit` for a limit budget, which carries its settings in `limit`, `window`, and `posture`.
    - `limit` AICostMoney, required: The spending limit for each budget window. With `each`, every derived budget gets this limit.
      - `value` string, required: The amount in major units of `currency`, as a canonical decimal string such as `4125.5` or `0.004372`: at most 9 fractional digits, no trailing fractional zeros, no exponent, and a leading `-` only when the amount is negative.
      - `currency` 'USD', required: The currency of `value`.
    - `window` object, required: The budget window: the period the limit applies to, such as a calendar month. When one window ends, the next starts.
      - `type` 'fixed', required: The kind of budget window. Always `fixed`: windows of length `interval` follow each other, aligned to `anchored_at`.
      - `interval` string, required: The length of each budget window, as an ISO 8601 duration such as `P1M` for a month or `P1D` for a day.
      - `anchored_at` string, required: A time when a budget window starts. Windows start a whole number of intervals before or after it. The intervals count in the local time of its time zone, so calendar units such as months stay aligned to the calendar. A window that would start on a day its month doesn't have, such as the 31st, starts on the month's last day. A date-time with a UTC offset and an IANA time zone in brackets, such as `2026-01-01T00:00:00+01:00[Europe/Budapest]`.
    - `posture` 'advisory' | 'enforce', required: How the budget responds when spend reaches its limit.
    - `validity` 'null', nullable, required: Always `null`, because only an exemption has `validity`.
  - AICostExemptBudget: An exemption declares that the usage in its scope is exempt from limits for a limited time. It sets no limit. The service stores and lists exemptions, but they change no balance or notification.
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `name` string, required: A human-readable name for the budget.
    - `labels` Labels, required: Key-value metadata on the budget. The budget list can filter by label. Balances and notification rules ignore labels.
    - `managed_by` ManagedBy, required: Identifies the tool that manages this resource, such as `{"tool": "terraform-provider-konnect"}`. The service stores the value and never acts on it.
    - `scope` object, required: The usage the budget covers.
      - `filters` AICostBudgetScopeFilter[], required: The filters that select the usage the budget counts. Usage must match every filter. An empty list covers all of the organization's usage.
        - union: One filter in a budget scope: a predicate on one usage field, or a group that combines filters with `and` or `or`.
          - union: A condition on one usage field. `op` selects the comparison and the shape of `value`: one value, a list of values, or `null` for `exists` and `nexists`. Usage without a value for the field matches only `nexists`.
            - AICostBudgetScopeValuePredicate: A predicate that compares a usage field with one value, using `eq`, `neq`, or `contains`.
              - …
            - AICostBudgetScopeValueListPredicate: A predicate that compares a usage field with a list of values, using `in`, `nin`, or `ocontains`.
              - …
            - AICostBudgetScopeExistsPredicate: A predicate that matches usage with any value for a field.
              - …
            - AICostBudgetScopeNExistsPredicate: A predicate that matches usage without a value for a field.
              - …
          - AICostBudgetScopeFilterGroup: A group of filters combined with `and` or `or`. A group's filters can include further groups.
            - `op` 'and' | 'or', required: How the group combines its filters: `and` requires every filter to match, and `or` requires at least one. Usage that matches several filters of an `or` counts once.
            - `filters` AICostBudgetScopeFilter[], required: The filters to combine, each a predicate or a nested group.
      - `each` union, required: The field that splits the budget. With `each`, the limit applies separately to every value of that field, such as each subject. Each value gets its own derived budget, and usage without a value for the field belongs to none of them. A fixed usage field or `tags.<key>`. `null` for a pooled budget, whose limit applies to all its usage together, and always `null` on an exemption.
        - 'subject_type' | 'subject' | 'subject_id' | 'group' | 'team' | 'model' | 'provider' | 'request_mode': A usage field that a budget scope can filter on, and that `each` can split a budget by: - `subject`: the subject reference, such as `principal/{uuid}`. Equal identifiers from different identity systems stay distinct. - `subject_id`: the subject's identifier without its type, which pools equal identifiers across identity systems. - `subject_type`: the subject's identity system: `principal`, `consumer`, or `oidc`. - `group`: the usage's group references. Usage can carry several groups. `eq` and `in` match when any of them matches. `neq` and `nin` match only usage with at least one group, and exclude it when any of its groups matches. - `team`: the usage's Kong Identity team references, with the membership rules of `group`. - `model`: the model that the provider reports as served. - `provider`: the provider that served the invocation. - `request_mode`: how the invocation was served: `stream`, `oneshot`, or `realtime`. A scope can also use `tags.<key>` for the value of one tag.
        - string
    - `priority` integer, required: The budget's priority, from 1 (highest) to 100 (lowest). You can filter and sort the budget list by it.
    - `created_by` string, uuid, nullable, required: The `id` of the user or system account that created the budget, which the server records. A person with a budget of their own can replace and delete only the budgets they created. `null` for a budget created before the service recorded creators.
    - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
    - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.
    - `effect` 'exempt', required: Always `exempt` for an exemption, which carries the period it covers in `validity`.
    - `limit` 'null', nullable, required: Always `null`, because an exemption sets no limit.
    - `window` 'null', nullable, required: Always `null`, because an exemption has no budget window.
    - `posture` 'null', nullable, required: Always `null`, because an exemption has no posture.
    - `validity` object, required: The period the exemption covers, from `starts_at` until `ends_at`.
      - `starts_at` string, required: When the exemption starts, as an RFC 3339 timestamp in UTC or as a date-time with a UTC offset and an IANA time zone in brackets, such as `2026-08-16T00:00:00+02:00[Europe/Budapest]`. If the request omitted it, the budget's `created_at`.
      - `ends_at` string, required: When the exemption ends, in the same formats as `starts_at`.

## Other responses

- `401`: The request has no valid access token. The token is missing, malformed, or expired, or it fails another check, and the response doesn't say which.
- `403`: The access token is valid, but its principal lacks the permission this operation requires. For an operation on one resource, the response doesn't reveal whether that resource exists.
- `404`: The organization has no budget with this identifier that the caller can see.

## Changes

- **2026-11-19** `3b071797f6e4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v1/ai-cost-management/budgets/:budgetId/get.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4?raw)
