v171

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0726249111.7 MB
Budgets

Create a new budget

Creates a new budget in the workspace. Exactly one scope variant must be set (workspace / project / identity / api_key / provider / model). At least one of limits.amount, limits.token_limit, or rate_limit.requests_per_minute MUST be provided. Uniqueness is enforced across (workspace_id, scope_kind, scope_target_id).

post/v2/budgets

Request body

is_activeboolean

Whether the budget should be active immediately. Defaults to true when omitted (handler enforces).

expires_atstring date-time

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

Response

OK