Skip to content
Docs

Archive AI Gateway budget

DELhttps://api.vercel.com/ai-gateway/budgets
Archive a team-, project-, or user-scope AI Gateway budget.
https://api.vercel.com/ai-gateway/budgets
const response = await fetch('https://api.vercel.com/ai-gateway/budgets?scopeType=string&projectId=string&userId=string&teamId=string&slug=string', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
Response
{
"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"
}
AuthorizationbearerToken

Default authentication mechanism

scopeTypestringRequired
The budget scope to archive.
projectIdstringOptional
Required when scopeType is "project".
userIdstringOptional
Required when scopeType is "user".
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200Success
activebooleanRequired
alertThresholdsarrayOptional
archivedbooleanRequired
createdAtnumberRequired
currentByokSpendnumberRequired
currentSpendnumberRequired
includeByokInQuotabooleanRequired
limitAmountnumberRequired
namestringOptional
quotaEntityIdstringRequired
refreshPeriodstringRequired
scopeIdstringRequired
The native Vercel id of the scoped entity. Team/project ids already carry their prefix, so this equals quotaEntityId (team_… / prj_…); for the api-key scope it is the api key id (the api_key_id_ prefix stripped).
scopeTypestringRequired
sourcestringOptional
Set when the row is inherited from the team's budget default.
updatedAtnumberRequired
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