---
title: "Get an AI Gateway rate limit"
method: GET
path: "/api/v2/rate-limits/{id}"
tags: ["AI Gateway"]
---

# Get an AI Gateway rate limit

`GET /api/v2/rate-limits/{id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/rate-limits/{id}`
- 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/rate-limits/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

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

## Path parameters

- `id` string, uuid, required

## Response `200`

OK

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

## Other responses

- `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)
