Skip to content

Get Costs For Tenant

GET
/api/v1/admin/costs/{tenant_id}
curl --request GET \
--url https://api.ultimateteam.ai/api/v1/admin/costs/example \
--header 'X-API-Key: <X-API-Key>'

Return the trailing-24h credit-consumption breakdown for a tenant.

Empty-state: a tenant with zero recent activity gets a 200 response with an empty rows array — the panel renders its friendly empty state, not an error.

tenant_id
required
Tenant Id

Tenant UUID (validated against UUID format)

string

Tenant UUID (validated against UUID format)

Successful Response

Media typeapplication/json
CostLivePayload

Frozen response shape for the /admin/costs/{tenant_id} endpoint.

object
generated_at
required
Generated At
string
grand_total_credits
required
Grand Total Credits
integer
grand_total_requests
required
Grand Total Requests
integer
rows
required
Rows
Array<object>
CostLiveRow

One row of the agent_role × model breakdown.

object
agent_role
required
Agent Role
string
credits_total
required
Credits Total
integer
model
required
Model
string
request_count
required
Request Count
integer
sparkline
required
Sparkline

24-point hourly credits series, oldest→newest

Array<integer>
>= 24 items <= 24 items
tenant_id
required
Tenant Id
string
window_hours
Window Hours
integer
default: 24
Example
{
"window_hours": 24
}

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"
}
]
}