control:read scope.
Get budget settings
Response
Fields
| Field | Description |
|---|---|
spend_cap | Credit cap for this billing cycle. Requests return 402 AI_CREDITS_EXHAUSTED when credits used reaches this value. null means no cap (full allotment applies). |
alert_thresholds | Sorted list of percentage integers (1–99) at which usage notifications are sent. Empty array means no alerts configured. Max 3 thresholds. |
credits_allotment | Total credits available this cycle (read-only — set by your plan). |
opus_enabled | Whether the Opus model is enabled for this org. When false, requests using claude-opus-4-7 return 403 OPUS_NOT_ENABLED. |
Update budget settings
Body
| Field | Type | Description |
|---|---|---|
spend_cap | integer or null | Credit cap. Min 0. Set null to remove the cap. |
alert_thresholds | array or null | Percentage integers, each 1–99. Max 3 entries. Sorted automatically. Set [] or null to clear. |
opus_enabled | boolean | true to enable Opus model access; false to disable. |
Response
Returns the updated budget state in the same shape as the GET response.action: budget.updated.
Error codes
| Code | HTTP | Description |
|---|---|---|
INVALID_API_KEY | 401 | Invalid or revoked token |
MISSING_SCOPE | 403 | Key lacks control:read scope |
VALIDATION_FAILED | 422 | spend_cap is negative; threshold out of 1–99 range; more than 3 thresholds |