Ranks the period's biggest consumers
Changed onOrders one dimension (consumers, applications, api-clients, models or api-proxies) by one metric (tokens, cost or requests) and gives each row its share of the period total. The total is summed over EVERY matching row, including rows the limit cut off, so the shares of a truncated answer add up to less than 100 instead of being renormalised. Consumers, models and api-proxies are answered from the daily AI usage rollup; applications and api-clients from the traffic log, which is bounded by its retention. dataSource states which one was used.
Request
- Base URLhttp://167.86.118.166:32080
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Project name
Query parameters
What to rank: consumers, applications, api-clients, models or api-proxies.
What to rank by: tokens (default), cost or requests.
Consumer organization code the ranking is narrowed to.
Start of the period, ISO-8601 UTC (2026-08-01, 2026-08-01T00:00:00Z or an offset date-time). Defaults to 30 days before 'to'.
End of the period, ISO-8601 UTC. Defaults to now. The period may not be inverted or wider than 366 days.
Exact LLM model id (e.g. gpt-5). Narrows the answer to that model's requests.
Environment name. Defaults to every environment of the project. Applies to traffic-log answers only; filters.environmentApplied reports whether it took effect.
Rows the answer may carry. Default 50, at most 500; truncated states whether rows were left out.
Response
successful operation!
Example response
{
"dimension": "consumers",
"metric": "cost",
"unit": "USD",
"period": {
"from": "2026-08-12T00:00:00Z",
"to": "2026-09-11T00:00:00Z",
"timeZone": "UTC"
},
"limit": 50,
"items": [
{
"window": "ONE_MONTH"
}
]
}Changes
- breaking
removed the enum value
api-clientsfrom thequeryrequest parameterdimension - breaking
removed the enum value
api-proxiesfrom thequeryrequest parameterdimension - breaking
removed the enum value
applicationsfrom thequeryrequest parameterdimension - breaking
removed the enum value
consumersfrom thequeryrequest parameterdimension - breaking
removed the enum value
costfrom thequeryrequest parametermetric - breaking
removed the enum value
modelsfrom thequeryrequest parameterdimension - breaking
removed the enum value
requestsfrom thequeryrequest parametermetric - breaking
removed the enum value
tokensfrom thequeryrequest parametermetric
This list may be incomplete.
- breaking
- info
endpoint added
- info