---
title: "Get an AI Gateway budget instance summary"
method: GET
path: "/api/v2/budgets/{id}/instances/summary"
tags: ["AI Gateway"]
---

# Get an AI Gateway budget instance summary

`GET /api/v2/budgets/{id}/instances/summary`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/budgets/{id}/instances/summary`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `ai_gateway_config_read`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/budgets/:id/instances/summary/get.ts> (a function with typed inputs; its response is checked against the schema)

Aggregate counters for an accounting window, including total spend and the numbers of instances at or above the warning threshold and capacity. Use split_dim to aggregate only counters that match every given dimension value.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `window` string, date-time
- `split_dim` string[]

## Response `200`

OK

- AiGatewayBudgetInstancesSummaryResponse: Response containing aggregate state across budget instance counters.
  - `data` AiGatewayBudgetInstancesSummaryResource, required: Aggregate state across budget instance counters.
    - `attributes` AiGatewayBudgetInstancesSummaryAttributes, required: Aggregate state across budget instance counters.
      - `budget_id` string, uuid, required: Budget identifier.
      - `exceeded_capacity_count` integer, required: Number of instances at or above capacity.
      - `instance_count` integer, required: Number of instance counters.
      - `over_warning_threshold_count` integer, required: Number of instances at or above the warning threshold.
      - `restricted_details` boolean, required: Whether instances were withheld because their provider or model is hidden. Summary counts and totals exclude those instances.
      - `total_spend_microcents` integer, required: Spend summed across all instances, in microcents.
      - `window_start` string, date-time, required: Start of the accounting window.
    - `id` string, uuid, required: Resource identifier.
    - `type` 'budget-instances-summary', required: Budget instance summary resource type.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
