Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Send exactly one of amount and unlimited: true.

product
string
required

Product to limit, as returned in product by the list operation.

Example:

"inference"

amount
number
required

Limit in USD. 0 blocks at the first cent of spend.

Required range: x >= 0
Example:

100

period
enum<string>
default:daily

daily is the current UTC day; monthly is the current UTC calendar month.

Available options:
daily,
monthly
Example:

"daily"

unlimited
enum<boolean>

Optional; only false is allowed together with amount.

Available options:
false
Example:

false

reason
string

Why the limit is set or changed, kept for audit.

Maximum string length: 500
Example:

"Team budget"

Response

The limit was created. evaluation says whether the change blocked the product.

data
object
required

The spend limit, spend and block state of one product and period.