---
title: Get an AI Gateway budget's current period
description: Get the active accounting window, enforced capacity, and current spend.
breadcrumbs: Docs > API > Get an AI Gateway budget's current period
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Get an AI Gateway budget's current period

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in Preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                         |
| ----------------- | -------------------------------------------------------------------- |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/budgets/{id}/current-period     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/budgets/{id}/current-period |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/budgets/{id}/current-period |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/budgets/{id}/current-period      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/budgets/{id}/current-period |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/budgets/{id}/current-period |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/budgets/{id}/current-period |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/budgets/{id}/current-period      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/budgets/{id}/current-period  |

### Overview

Get the active accounting window, enforced capacity, and current spend.

This endpoint requires the `ai_gateway_config_read` permission.

OAuth apps require the `ai_gateway_config_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#ai-gateway) to access this endpoint.

### Arguments

#### Path Parameters

| Field           | Type   | Description  |
| --------------- | ------ | ------------ |
| id [*required*] | string | Budget UUID. |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response containing an AI Gateway budget's active period.

| Parent field | Field                                      | Type      | Description                                                                                           |
| ------------ | ------------------------------------------ | --------- | ----------------------------------------------------------------------------------------------------- |
|              | data [*required*]                          | object    | Active accounting period for an AI Gateway budget.                                                    |
| data         | attributes [*required*]                    | object    | Accounting state enforced for an AI Gateway budget's active period.                                   |
| attributes   | budget_id [*required*]                     | uuid      | Budget resource identifier.                                                                           |
| attributes   | current_spend_microcents [*required*]      | int64     | Spend currently counted against the active accounting period.                                         |
| attributes   | default_capacity_microcents [*required*]   | int64     | Capacity that new accounting periods inherit from the budget definition.                              |
| attributes   | effective_capacity_microcents [*required*] | int64     | Capacity enforced for the active accounting period.                                                   |
| attributes   | monitor_id [*required*]                    | int64     | Datadog monitor ID provisioned for this budget. Null when monitor provisioning was skipped or failed. |
| attributes   | window_end [*required*]                    | date-time | End of the active accounting window.                                                                  |
| attributes   | window_start [*required*]                  | date-time | Start of the active accounting window.                                                                |
| data         | id [*required*]                            | uuid      | Budget identifier associated with this active period.                                                 |
| data         | type [*required*]                          | enum      | AI Gateway budget period resource type. Allowed enum values: `budget-periods`.                        |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "attributes": {
      "budget_id": "11111111-1111-1111-1111-111111111111",
      "current_spend_microcents": 25000000,
      "default_capacity_microcents": 100000000,
      "effective_capacity_microcents": 120000000,
      "monitor_id": 12345678,
      "window_end": "2026-08-28T00:00:00Z",
      "window_start": "2026-08-27T00:00:00Z"
    },
    "id": "11111111-1111-1111-1111-111111111111",
    "type": "budget-periods"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not Found

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Path parameters
export id="11111111-1111-1111-1111-111111111111"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/budgets/${id}/current-period" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
