---
title: "Get AI Gateway rate limit usage"
method: GET
path: "/api/v2/rate-limits/usage"
tags: ["AI Gateway"]
---

# Get AI Gateway rate limit usage

`GET /api/v2/rate-limits/usage`

## Request

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

Get live usage for the organization's rate limits. Returns requests and tokens counted in the rolling one-minute window and requests limited in the last 15 minutes for each enabled rate limit, plus `untracked` (traffic no enforced rate limit covers) and `total` (all gateway traffic).

## Response `200`

OK

- AiGatewayRateLimitUsageListResponse: Response containing live usage for the organization's AI Gateway rate limits.
  - `data` AiGatewayRateLimitUsageResource[], required
    - `attributes` AiGatewayRateLimitUsageAttributes, required: Live consumption of one AI Gateway rate limit.
      - `input_tokens` integer, required: Input tokens counted in the rolling one-minute window.
      - `limited_requests` integer, required: Requests this rate limit rejected in the last 15 minutes. Applies when mode is ENFORCE.
      - `output_tokens` integer, required: Output tokens counted in the rolling one-minute window.
      - `requests` integer, required: Requests counted in the rolling one-minute window.
      - `would_limit_requests` integer, required: Requests this rate limit would have rejected in the last 15 minutes. Applies when mode is ALERT.
    - `id` string, required: Rate limit UUID, `untracked` for traffic no enforced rate limit covers, or `total` for all gateway traffic.
    - `type` 'rate-limit-usage', required: AI Gateway rate limit usage resource type.

## Other responses

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