AI Gateway

Create an AI Gateway rate limit

Create a rate limit. All requests matching its scope share one allowance, and every matching rate limit applies. Returns 409 when another active rate limit has the same user, Team, and tags, or when the organization already has the maximum number of rate limits.

post/api/v2/rate-limits

Request

Request body

Example request

{
  "data": {
    "attributes": {
      "mode": "ALERT",
      "name": "Default rate limit",
      "requests_per_minute": 600,
      "team_id": "00000000-0000-4000-8000-000000000002",
      "user_id": "00000000-0000-4000-8000-000000000001"
    },
    "type": "rate-limits"
  }
}

Response

Created

Example response

{
  "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,
      "tags": {
        "provider": "openai"
      },
      "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"
  }
}

Changes

Changes to this operation have not been checked yet.