SetAiSpendCap
Sets the monthly LLM spend cap in EUR of a tenant for the central-key LLM gateway. Platform role AiBudgetAdmin in the system tenant only; every change is audited (old, new, who, why).
Examples
Set a monthly cap of EUR 20 (key source kept; a tenant without an entry gets CentralKey). Add -ks CentralKey to switch a tenant with another key source to the central key:
octo-cli -c SetAiSpendCap `
-t "ai-sandbox" `
-c "20" `
-r "pilot budget"
Options
| Short | Long | Required | Description |
|---|---|---|---|
-t | --tenantId | yes | Id of the tenant whose cap is set |
-c | --capMonthlyEur | yes | Monthly cap in EUR (UTC calendar month), e.g. 20 or 12.5; 0 stops the tenant's central-key calls |
-r | --reason | yes | Why the cap changes (stored in the audit record, max. 500 characters) |
-ks | --keySource | no | Key source: CentralKey, None, ByoKey or Subscription. Not given: the tenant keeps its current key source (CentralKey when it has none yet). Only CentralKey is served by the gateway |
Notes
Run it in a context logged in to the system tenant with the role AiBudgetAdmin and full API access. A tenant administrator, or a holder of AiBudgetAdmin in a child tenant, is refused (403).
The cap is stored in the system database, not in the tenant: tenants cannot raise it. AiQuotaLimit in the tenant stays a self-limit for a tenant's own key.
The gateway uses the new cap within its cap cache time (at most 60 seconds), without a restart.
Read cap and spend with GetAiSpend.