Enterprise
Budget Controls
Set spending limits at the org, app, or API key level with soft alerts and hard caps that block requests when exceeded.
Enterprise feature
Budget controls are available on Enterprise plans.
Overview
Budgets let you cap LLM spending with two thresholds: a soft limit (warning) and a hard limit (blocks requests). Budgets reset monthly and can be scoped to an organization, a specific app, or an individual API key.
Budget Scopes
| Scope | Description |
|---|---|
org | Total spend across the entire organization |
app | Spend for a specific application |
key | Spend for a specific API key |
Create a Budget
POST
/api/v1/budgetsCreate a spending budget. Requires admin role.
bash
curl -X POST https://api.ingateai.com/api/v1/budgets \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"scope": "org",
"scope_id": "org-uuid-here",
"soft_limit_usd": 500,
"hard_limit_usd": 1000,
"period_type": "monthly"
}'API Endpoints
GET
/api/v1/budgetsList all budgets for the current org.
GET
/api/v1/budgets/:idGet a specific budget.
PUT
/api/v1/budgets/:idUpdate soft/hard limits.
DELETE
/api/v1/budgets/:idDelete a budget.
GET
/api/v1/budgets/:id/statusGet current spend, remaining balance, and utilization.
Budget Status Response
jsonResponse
{
"budget": {
"id": "...",
"scope": "org",
"soft_limit_usd": 500,
"hard_limit_usd": 1000,
"period_type": "monthly"
},
"current_spend": 347.82,
"remaining": 652.18,
"utilization": 0.348
}Enforcement
Budget enforcement runs as middleware on the proxy chain. When a hard limit is exceeded, the request is blocked with a 429 response:
json429 Response
{
"error": "budget exceeded",
"error_code": "budget_exceeded",
"budget_id": "...",
"current_spend": 1002.50,
"hard_limit_usd": 1000
}Webhook alerts
Budget events emit
budget.warning and budget.exceeded webhook events. Configure webhooks to get Slack or email notifications when budgets are approaching limits.