Skip to content
Docs

List AI Gateway budgets

GET/__remote/api.vercel.com/ai-gateway/budgets/list
List the team's AI Gateway budgets (team/project/user scopes, plus default-covered api-key spend) as a flat list, optionally filtered by scope. Without limit or cursor, returns every budget. With either, returns one page ordered by quotaEntityId plus nextCursor (null on the last page) and defaultCoveredCounts. Paging still reads the full merge server-side: the gateway meter list it joins has no cursor.
Request
import { Edgenivo } from "@vercel/sdk";
const vercel = new Edgenivo({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.aiGateway.listAiGatewayBudgets({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Response
{
"budgets": [
{
"active": "false",
"alertThresholds": [],
"archived": "false",
"createdAt": "123",
"currentByokSpend": "123",
"currentSpend": "123",
"includeByokInQuota": "false",
"limitAmount": "123",
"name": "Example Name",
"quotaEntityId": "example_id",
"refreshPeriod": "daily",
"scopeId": "example_id",
"scopeType": "api-key",
"source": "default",
"updatedAt": "123"
}
],
"defaultCoveredCounts": {
"api-key": "123",
"project": "123",
"team": "123",
"user": "123"
},
"nextCursor": "string"
}
AuthorizationbearerToken

Default authentication mechanism

scopeTypestringOptional
Restrict the list to a single budget scope.
includeDefaultCoveredstringOptional
Whether to include rows inherited from a budget default (source: "default"). Defaults to true.
limitintegerOptional
Maximum number of budgets to return (capped at 200). Enables pagination.
cursorstringOptional
Opaque cursor returned by a prior call as nextCursor.
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200Success
budgetsarrayRequired
defaultCoveredCountsobjectOptional
Paged requests only: source: 'default' rows per scope type across the whole scopeType-filtered list, independent of the page and of includeDefaultCovered.
nextCursorstringOptional
Paged requests only (limit or cursor set): pass as cursor to read the next page; null on the last page.
400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
500Error