Scenario: Budget Enforcement
Prevent runaway AI spending before it hits your invoice. The Axemere gateway enforces spend limits in real time; requests that would breach a budget are denied before they reach the provider.
Budget enforcement is available at four scopes:
- Organisation: total spend cap across all activity
- Project: aggregate limit across all workloads in a project
- Provider: limit spend against a specific AI provider
- Workload: limit spend for a specific application or team
Configuring budgets in the console
Alerts and enforcement are both configured from the same place: the Budgets page (Govern → Budgets in the left nav). There's no separate alerts page and enforcement page; each budget has independent Alert and Cap toggles.
- Go to Budgets in the left nav.
- Click Add Budget.
- Select a Scope: Organisation, Project, Provider, or Workload.
- Choose a Period: Daily, Weekly, Monthly, or Billing period.
- Enter the Limit in USD.
- Set Warning at (%) and Critical at (%) thresholds (defaults: 80% / 95%).
- Turn on Alert to notify a channel (Slack, Teams, Google Chat, Discord, or Email) when spend crosses the thresholds, Cap to deny requests once spend reaches the critical threshold, or both.
- Click Create Budget; the Control Plane (CP) distributes the updated configuration to all connected nodes immediately.
Alert vs. Cap: Alert notifies a channel as spend approaches the limit. Cap denies further requests in that scope once spend reaches the critical threshold, until the period resets. A budget can run Alert alone, Cap alone, both (
Alert + Cap), or neither (Draft, tracked but not yet acting on anything).
Cap enforcement is available across all four scopes and all period types in managed mode.
Advanced: enforcement caps via YAML (self-hosted only)
For Free Gateway or self-hosted deployments not connected to the Control Plane, budget caps aren't configured from the console; write a policy rule directly into your policy bundle instead:
targets: - id: budget.analytics.monthly-cap priority: 100 when: field: context.workload_spend_usd_mtd greater_than: 500 effect: decision: deny reason: "Monthly budget of $500 exceeded for this workload"
Once the threshold is crossed for the matching workload in the current calendar month, the gateway returns:
{ "decision": "deny", "reason": "Monthly budget of $500 exceeded for this workload", "request_id": "req-..." }
Layering budgets across workloads
Stack rules to give different limits to different workloads:
| Workload | Condition | Effect |
|---|---|---|
wl-analytics | context.workload_spend_usd_mtd > 500 | deny |
wl-production | context.workload_spend_usd_mtd > 5000 | deny |
wl-research | context.workload_spend_usd_mtd > 100 | deny |
Monitoring spend
Check current spend on the Dashboard (spend by workload), the Spend page, or the utilisation bar on each row of the Budgets page. All update in real time as requests flow through the gateway.
Related Topics
- Budgets — configuring alert and cap budgets in the console
- Policy DSL reference — full rule schema and condition fields
- Identity and Attribution guide — project and workload attribution
- Local Console: Spend — real-time spend monitoring