Pular para o conteúdo principal
POST
cURL
Guia relacionado: Guia de orçamentos. Consulte o Guia de orçamentos para ver um passo a passo com exemplos.

Autorizações

Authorization
string
header
obrigatório

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

Corpo

application/json
scope
object

Structured scope. Mutually exclusive with match: provide a scope for the six canonical kinds (the server derives the matching CEL), or provide match for a dynamic budget. Exactly one of the two must be set.

match
object

Raw CEL matching expression for dynamic budgets (e.g. metadata.team == "ml" && provider == "openai"). Validated via CEL parse at write time. Mutually exclusive with scope.

limits
object

At least one of amount / token_limit / rate_limit.requests_per_minute must be provided on the budget.

rate_limit
object

Optional rate limit.

is_active
boolean

Whether the budget should be active immediately. Defaults to true when omitted.

expires_at
string<date-time>

Optional expiration. When set in combination with is_active=true, the value MUST be in the future; the API rejects a past value.

alerts
object[]

Optional threshold notifications. Ids are assigned by the server, so alerts[].id must be omitted here; supplying one is rejected.

Resposta

OK

budget
object
obrigatório

Newly created budget.