budgets

Create a new budget.

post/api/v1/budgets

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Request body

budget_duration_secinteger nullable

Budget duration in seconds (e.g., 86400 for daily, 604800 for weekly)

max_budgetnumber nullable

Maximum spending limit

namestring nullable

Admin-facing label for the budget

request_limitinteger nullable

Maximum requests over the period. Independent of max_budget; null is unlimited

reset_alignment'calendar_day' | 'calendar_week' | 'calendar_month' nullable

Reset on a UTC calendar boundary instead of a fixed number of seconds, which is the only way to express a calendar month. Mutually exclusive with budget_duration_sec

rpm_limitinteger nullable

Requests per minute for each user on this budget, across replicas; null is unlimited

token_limitinteger nullable

Maximum tokens over the period. Independent of max_budget; null is unlimited

tpm_limitinteger nullable

Tokens per minute for each user on this budget, counted on what requests used: a request is admitted while the user's minute is under the limit. Null is unlimited

Response

Successful Response

budget_duration_secinteger nullable required
budget_idstring required
created_atstring required
max_budgetnumber nullable required
namestring nullable required
organization_idstring uuid nullable required
request_limitinteger nullable required
reset_alignmentstring nullable required
rpm_limitinteger nullable
token_limitinteger nullable required
total_reservednumber
total_spendnumber
tpm_limitinteger nullable
updated_atstring required
user_countinteger

Changes

    • info

      added the optional property to the response with the status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status