---
title: "List rules"
method: GET
path: "/ai-gateway/rules"
tags: ["ai-gateway"]
---

# List rules

`GET /ai-gateway/rules`

## Request

- Base URL: `https://api.vercel.com`
- URL: `https://api.vercel.com/ai-gateway/rules`
- Auth: HTTP bearer

List the authenticated team's routing rules, oldest first. Without `limit` or `cursor`, returns every rule. With either, returns one page and a `nextCursor` for the next page (null on the last page). Paging reads and sorts the team's rules server-side, which is fine at current rule counts.

## Query parameters

- `includeDisabled` 'true' | 'false'
- `limit` integer: Maximum number of rules to return (capped at 200). Enables pagination.
- `cursor` string: Opaque cursor returned by a prior call as nextCursor.
- `teamId` string
- `slug` string

## Response `200`

- AiGatewayRuleList
  - `nextCursor` string, nullable, required
  - `rules` AiGatewayRule[], required
    - `action` object
      - `reason` string
      - `rewriteModel` string
    - `createdAt` number, required
    - `createdBy` string
    - `deleted` false | true
    - `description` string
    - `enabled` false | true, required
    - `match` object
      - `model` string
    - `ownerId` string, required
    - `ruleId` string, required
    - `type` 'deny' | 'rewrite', required
    - `updatedAt` number, required
    - `updatedBy` string

## Other responses

- `400`: One of the provided values in the request query is invalid.
- `401`: The request is not authorized.
- `403`: You do not have permission to access this resource.
- `404`
- `410`
- `500`

## Changes

- **2026-10-15** `8939e3983223`: 3 info
  - added the new optional `query` request parameter `cursor`
  - added the new optional `query` request parameter `limit`
  - added the required property `nextCursor` to the response with the `200` status
- **2026-09-30** `6f68095b42b1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vercel/apis/api/changes/ai-gateway/rules/get.md)

---

[API](https://skmtc.dev/vercel/apis/api.md) - [All operations](https://skmtc.dev/vercel/apis/api/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/api/revisions/4a06e85c2848?raw)
