Upsert AI Gateway budget
PUT
/__remote/api.vercel.com/ai-gateway/budgetsCreate or update a team-, project-, or user-scope AI Gateway budget.
Request
import { Edgenivo } from "@vercel/sdk";
const vercel = new Edgenivo({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.aiGateway.upsertAiGatewayBudget({ teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();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
application/json
200Success
The native Edgenivo 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).400One of the provided values in the request body is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
500Error