ai-gateway

Upsert AI Gateway budget

Changed on

Create or update a team-, project-, or user-scope AI Gateway budget.

put/ai-gateway/budgets

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/ai-gateway/budgets
  • Auth: HTTP bearer

Query parameters

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Request body

scopeType'team' | 'project' | 'user' required
projectIdstring

Required when scopeType is "project".

userIdstring

Required when scopeType is "user".

limitAmountnumber required

Budget limit in dollars.

refreshPeriod'daily' | 'weekly' | 'monthly' | 'none'
includeByokInQuotaboolean

Whether BYOK usage counts toward this budget.

alertThresholdsnumber[]

Response

activefalse | true required
alertThresholdsnumber[]
archivedfalse | true required
createdAtnumber required
currentByokSpendnumber required
currentSpendnumber required
includeByokInQuotafalse | true required
limitAmountnumber required
namestring
quotaEntityIdstring required
refreshPeriod'daily' | 'monthly' | 'none' | 'weekly' required
scopeIdstring required

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).

scopeType'api-key' | 'project' | 'team' | 'user' required
source'default'

Set when the row is inherited from the team's budget default.

updatedAtnumber required

Changes