List rules
GET
/__remote/api.vercel.com/ai-gateway/rulesList 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./__remote/api.vercel.com/ai-gateway/rules
const response = await fetch('/__remote/api.vercel.com/ai-gateway/rules?includeDisabled=string&limit=123&cursor=string&teamId=string&slug=string', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{ "nextCursor": "string", "rules": [ { "action": { "reason": "Customer requested refund", "rewriteModel": "string" }, "createdAt": "123", "createdBy": "string", "deleted": "false", "description": "string", "enabled": "false", "match": { "model": "string" }, "ownerId": "example_id", "ruleId": "example_id", "type": "deny", "updatedAt": "123", "updatedBy": "string" } ]}AuthorizationbearerToken
Default authentication mechanism