Get Costs For Tenant
GET
/api/v1/admin/costs/{tenant_id}
const url = 'https://api.ultimateteam.ai/api/v1/admin/costs/example';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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”tenant_id
required
Tenant Id
Tenant UUID (validated against UUID format)
string
Tenant UUID (validated against UUID format)
Responses
Section titled “ Responses ”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>
CostLiveRowOne 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>
tenant_id
required
Tenant Id
string
window_hours
Window Hours
integer
Example
{ "window_hours": 24}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" } ]}