Get Costs For Tenant
GET /api/v1/admin/costs/{tenant_id}
GET
/api/v1/admin/costs/{tenant_id}
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.
Authorizations
Parameters
Path Parameters
tenant_id
required
Tenant UUID (validated against UUID format)
string
Tenant UUID (validated against UUID format)
Responses
200
Successful Response
Frozen response shape for the /admin/costs/{tenant_id} endpoint.
object
generated_at
required
string
grand_total_credits
required
integer
grand_total_requests
required
integer
rows
required
Array<object>
One row of the agent_role × model breakdown.
object
agent_role
required
string
credits_total
required
integer
model
required
string
request_count
required
integer
sparkline
required
24-point hourly credits series, oldest→newest
Array<integer>
tenant_id
required
string
window_hours
integer
422
Validation Error
object
detail
Array<object>
object
ctx
object
input
loc
required
Array
msg
required
string
type
required
string