AI Gateway

Get an AI Gateway rate limit counter summary

Changed on

Aggregate a template rate limit's hot counters (those near or at a limit, or limiting, in the last hour), including how many there are, how many are near or at their limit, and the fullest counter's utilization. Use split_dim to aggregate only counters that match every given dimension value. When the caller can't see the template's selector, every count is zero and scope_restricted is true. Summaries are cached for up to 15 seconds. Returns 503 when counter usage can't be read.

get/api/v2/rate-limits/{id}/instances/summary

Request

  • Base URL
    https://api.datadoghq.com
  • Auth
    • API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
    • or OAuth 2
      Authorization code/oauth2/v1/authorize
      Token URL/oauth2/v1/token
      Scopesai_gateway_config_read

Path parameters

idstring uuid required

Rate limit UUID.

Query parameters

split_dimstring[]

Keep only counters whose split dimension equals a value, written as <dim>=<value>, such as split_dim=user_id=<uuid>&split_dim=model=gpt-4o. Dimensions use the split_dims names user_id, team_id, model, provider, and tag:<key>. Repeat the parameter to filter on several dimensions; a counter must match all of them. Each dimension may appear once and must be a per-value dimension of the rate limit.

Response

OK

Example response

{
  "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"
    },
    "id": "33333333-3333-3333-3333-333333333333",
    "type": "rate-limit-instances-summary"
  }
}

Changes