---
title: List AI Gateway rate limit counter summaries
description: Aggregate the counters of every template rate limit in the organization in one call, with one summary per template in the order the rate limit list…
breadcrumbs: Docs > API > List AI Gateway rate limit counter summaries
---

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

# List AI Gateway rate limit counter summaries

## 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/rate-limits/instances/summary     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/rate-limits/instances/summary |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/rate-limits/instances/summary |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/rate-limits/instances/summary      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/rate-limits/instances/summary |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/rate-limits/instances/summary |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/rate-limits/instances/summary |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/rate-limits/instances/summary      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/rate-limits/instances/summary  |

### Overview

Aggregate the counters of every template rate limit in the organization in one call, with one summary per template in the order the rate limit list returns them. Each summary is the one the single-template counter summary endpoint returns without split_dim, including scope_restricted and truncated. Rate limits with one shared allowance are left out. Summaries are cached for up to 15 seconds.

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.

### Response

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

{% tabs %}
{% tab label="Model" %}
Response containing the counter summary of every template rate limit in the organization.

| Parent field | Field                         | Type     | Description                                                                                                                                                                 |
| ------------ | ----------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]             | [object] |                                                                                                                                                                             |
| data         | attributes [*required*]       | object   | Aggregate of a template rate limit's counters.                                                                                                                              |
| attributes   | instance_count [*required*]   | int64    | Number of counters that were near or at a limit, or limited a request, in the last hour. Counters with room to spare aren't recorded.                                       |
| attributes   | limited_requests              | int64    | Requests the counters rejected in the last 15 minutes (ENFORCE), totaled over the counters whose usage was read.                                                            |
| attributes   | limiting_count [*required*]   | int64    | Counters that limited, or would have limited, a request in the last 15 minutes.                                                                                             |
| attributes   | max_utilization [*required*]  | double   | Utilization of the fullest counter.                                                                                                                                         |
| attributes   | near_limit_count [*required*] | int64    | Counters at 80% or more of a limit in the rolling window.                                                                                                                   |
| attributes   | rate_limit_id [*required*]    | uuid     | Rate limit UUID.                                                                                                                                                            |
| attributes   | scope_restricted              | boolean  | True when the caller can't see the template's selector because it lists a provider or model the caller can't access. The counters are then hidden, and every count is zero. |
| attributes   | truncated [*required*]        | boolean  | True when some recently active counters' usage wasn't read, so the counts may be low.                                                                                       |
| attributes   | would_limit_requests          | int64    | Requests the counters would have rejected in the last 15 minutes (ALERT), totaled over the counters whose usage was read.                                                   |
| data         | id [*required*]               | uuid     | Rate limit UUID.                                                                                                                                                            |
| data         | type [*required*]             | enum     | AI Gateway rate limit counter summary resource type. Allowed enum values: `rate-limit-instances-summary`.                                                                   |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": [
    {
      "attributes": {
        "instance_count": 14,
        "limited_requests": 25,
        "limiting_count": 2,
        "max_utilization": 1.2,
        "near_limit_count": 3,
        "rate_limit_id": "33333333-3333-3333-3333-333333333333",
        "scope_restricted": false,
        "truncated": false,
        "would_limit_requests": 0
      },
      "id": "33333333-3333-3333-3333-333333333333",
      "type": "rate-limit-instances-summary"
    }
  ]
}
```
{% /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
# 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/rate-limits/instances/summary" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
