---
title: Get an AI Gateway rate limit
description: Get a rate limit by ID, including its scope, per-minute request and token limits, and whether it is enabled.
breadcrumbs: Docs > API > Get an AI Gateway rate limit
---

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

# Get an AI Gateway rate limit

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

### Overview

Get a rate limit by ID, including its scope, per-minute request and token limits, and whether it is enabled.

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 | Rate limit UUID. |

### Response

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

{% tabs %}
{% tab label="Model" %}
Response containing one AI Gateway rate limit.

| Parent field         | Field                         | Type      | Description                                                                                                                               |
| -------------------- | ----------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|                      | data [*required*]             | object    | AI Gateway rate limit resource.                                                                                                           |
| data                 | attributes [*required*]       | object    | Attributes of an AI Gateway rate limit.                                                                                                   |
| attributes           | created_at [*required*]       | date-time | Creation timestamp.                                                                                                                       |
| attributes           | created_by [*required*]       | string    | Email of the user who created this rate limit.                                                                                            |
| attributes           | enabled [*required*]          | boolean   | Whether this rate limit is active.                                                                                                        |
| attributes           | input_tokens_per_minute       | int64     | Maximum input tokens per rolling minute shared by all matching traffic. Null when this rule does not limit input tokens.                  |
| attributes           | mode [*required*]             | enum      | Action taken when request rate exceeds the limit. Allowed enum values: `ALERT`, `ENFORCE`.                                                |
| attributes           | monitor_id                    | int64     | Datadog monitor that alerts on this rule. Null until one is provisioned.                                                                  |
| attributes           | name [*required*]             | string    | Rate limit name.                                                                                                                          |
| attributes           | output_tokens_per_minute      | int64     | Maximum output tokens per rolling minute shared by all matching traffic. Null when this rule does not limit output tokens.                |
| attributes           | requests_per_minute           | int64     | Maximum requests per rolling minute shared by all matching traffic. Null when this rule does not limit requests.                          |
| attributes           | revision [*required*]         | int64     | Increases on every change to the definition.                                                                                              |
| attributes           | scope_restricted [*required*] | boolean   | Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an unrelated update to preserve their saved values. |
| attributes           | tags [*required*]             | object    | Optional scope tags, such as provider, model, ml_app, or custom dimensions. A request matches when it has all of these tags.              |
| additionalProperties | <any-key>                     | string    |                                                                                                                                           |
| attributes           | team_id                       | uuid      | Optional Team UUID. Count only requests attributed to this Datadog Team.                                                                  |
| attributes           | updated_at [*required*]       | date-time | Last modification timestamp.                                                                                                              |
| attributes           | updated_by [*required*]       | string    | Email of the user who last modified this rate limit.                                                                                      |
| attributes           | user_id                       | uuid      | Optional user UUID. Count only this user's requests.                                                                                      |
| data                 | id [*required*]               | uuid      | Rate limit UUID.                                                                                                                          |
| data                 | type [*required*]             | enum      | AI Gateway rate limit resource type. Allowed enum values: `rate-limits`.                                                                  |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "attributes": {
      "created_at": "2026-09-01T00:00:00Z",
      "created_by": "user@example.com",
      "enabled": true,
      "input_tokens_per_minute": 500000,
      "mode": "ALERT",
      "monitor_id": 12345678,
      "name": "Default rate limit",
      "output_tokens_per_minute": 200000,
      "requests_per_minute": 1000,
      "revision": 1,
      "scope_restricted": false,
      "tags": {
        "<any-key>": "string"
      },
      "team_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
      "updated_at": "2026-09-15T14:30:00Z",
      "updated_by": "user@example.com",
      "user_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    },
    "id": "33333333-3333-3333-3333-333333333333",
    "type": "rate-limits"
  }
}
```
{% /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="33333333-3333-3333-3333-333333333333"

# 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/${id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
