Skip to content

Get Budget Exhaustion Rate

GET
/api/v1/admin/costs/budget-exhaustion-rate
curl --request GET \
--url 'https://api.ultimateteam.ai/api/v1/admin/costs/budget-exhaustion-rate?window_hours=24' \
--header 'X-API-Key: <X-API-Key>'

Return rolling per-role budget exhaustion rate.

Aggregates the cross-tenant decisions table over a rolling window (default 24h, max 168h / 1 week). A decision is “exhausted” when tool_calls_used >= tool_calls_max OR reflection_rounds_used >= reflection_rounds_max.

Alerting: alerting=True iff rate_pct > 5.0 AND executions >= 20 (small-sample guard prevents 1-of-1 false positives from tripping the rule at 100%).

window_hours
Window Hours
integer
default: 24

Successful Response

Media typeapplication/json
BudgetExhaustionRateResponse

Frozen response shape for the budget-exhaustion-rate endpoint.

object
alert_threshold_pct
required
Alert Threshold Pct
number
computed_at
required
Computed At
string
min_sample
required
Min Sample
integer
rates
required
Rates
Array<object>
BudgetRateEntry

One row of the per-role budget exhaustion rate breakdown.

object
alerting
required
Alerting
boolean
executions
required
Executions
integer
exhausted
required
Exhausted
integer
rate_pct
required
Rate Pct
number
role
required
Role
string
window_hours
required
Window Hours
integer
Examplegenerated
{
"alert_threshold_pct": 1,
"computed_at": "example",
"min_sample": 1,
"rates": [
{
"alerting": true,
"executions": 1,
"exhausted": 1,
"rate_pct": 1,
"role": "example"
}
],
"window_hours": 1
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}