Budget endpoints
Read and update your budget policy programmatically.
GET
/budget/statususerGet current daily/monthly spend and active policy.
json
{
"daily": { "spent": 3.42, "limit": 50.0, "percentage": 6.8, "remaining": 46.58 },
"monthly": { "spent": 41.20, "limit": 500.0, "percentage": 8.2, "remaining": 458.80 },
"policy": {
"max_single_request": 0.50,
"degrade_at_80": true,
"degrade_at_95": true,
"off_hours_tier": "light",
"off_hours": "22:00-06:00"
}
}POST
/budget/policyuserUpdate your budget policy. Body can be a preset name or a custom object.
To apply a preset: {"preset": "startup"}. To set custom values: send the individual fields (max_daily_spend, max_monthly_spend, degrade_at_80, …).
Real-time enforcement
Changes to budget policy take effect immediately — they apply to the very next request. No caching, no propagation delay.