Get Budget Exhaustion Rate
GET
/api/v1/admin/costs/budget-exhaustion-rate
const url = 'https://api.ultimateteam.ai/api/v1/admin/costs/budget-exhaustion-rate?window_hours=24';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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%).
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”window_hours
Window Hours
integer
Responses
Section titled “ Responses ”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>
BudgetRateEntryOne 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>
ValidationErrorobject
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" } ]}