Skip to main content
POST
Create budget

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Body

application/json
scope
object
required

A budget caps monthly AI spending for a project, person, API key, or combination of these fields. A request must match every field in the budget scope. If several budgets apply, the most specific exhausted budget rejects the request before account credit and provider spending checks. Only one budget is allowed per scope (409); change an existing limit with an update. The scope cannot change later; create a separate budget for a different scope. API keys and runtime credentials are refused. A member cap cannot target the caller. A new member cap cannot target the project owner.

monthly_limit_credits
number

Monthly AI spending limit in credits. Usage already recorded this month counts toward the limit. Supply exactly one of the credit or the deprecated USD limit. At most 8589934591.999999 credits, with at most six decimal places. A value of 0 blocks all spending within the scope. Provide exactly one of monthly_limit_credits or monthly_limit_usd.

Required range: 0 <= x <= 8589934591.999999
Example:

500

monthly_limit_usd
number
deprecated

Deprecated. Use monthly_limit_credits. Monthly limit in USD, converted to credits at the published credit price. At most 858993459.1999999 USD, the most that converts within the credit maximum. A value of 0 blocks all spending within the scope. Provide exactly one of monthly_limit_credits or monthly_limit_usd.

Required range: 0 <= x <= 858993459.1999999
Example:

50

Response

Budget created

id
string<uuid>
required
scope
object
required
monthly_limit_usd
number
required

The monthly AI spend limit, in USD

monthly_limit_credits
number
required

The same limit in credits, the unit spend is counted in

status
object
required

Usage against the budget for the current month, or null if the subject has no budget.

created_at
string
required
updated_at
string
required