@@ -2565,15 +2565,27 @@ curl http://localhost:9100/v1/analytics/costs \
25652565GET /v1/analytics/tokens
25662566```
25672567
2568- Returns aggregated token usage with per-model distribution and daily cost trends.
2568+ Returns aggregated token usage with per-model distribution, daily cost trends, and per-day token breakdown.
2569+
2570+ ** Query Parameters:**
2571+
2572+ | Parameter | Type | Description |
2573+ | -----------| ------| ------------|
2574+ | ` from ` | ISO 8601 string | Optional. Filter records from this timestamp. |
2575+ | ` to ` | ISO 8601 string | Optional. Filter records up to this timestamp. |
25692576
25702577| Role | Required |
25712578| ------| ----------|
25722579| admin, operator, viewer | Yes |
25732580
25742581``` bash
2582+ # Full breakdown
25752583curl http://localhost:9100/v1/analytics/tokens \
25762584 -H " Authorization: Bearer $TOKEN "
2585+
2586+ # Filtered by date range
2587+ curl " http://localhost:9100/v1/analytics/tokens?from=2026-05-01T00:00:00Z&to=2026-05-10T23:59:59Z" \
2588+ -H " Authorization: Bearer $TOKEN "
25772589```
25782590
25792591** Response:**
@@ -2588,6 +2600,10 @@ curl http://localhost:9100/v1/analytics/tokens \
25882600 "dailyCost" : [
25892601 { "date" : " 2026-04-22" , "estimatedCostUsd" : 24.50 , "sessions" : 12 }
25902602 ],
2603+ "dailyBreakdown" : [
2604+ { "date" : " 2026-05-10" , "inputTokens" : 300000 , "outputTokens" : 150000 , "cacheReadTokens" : 60000 , "cacheWriteTokens" : 40000 },
2605+ { "date" : " 2026-05-11" , "inputTokens" : 280000 , "outputTokens" : 120000 , "cacheReadTokens" : 45000 , "cacheWriteTokens" : 35000 }
2606+ ],
25912607 "generatedAt" : " 2026-04-28T06:00:00.000Z"
25922608}
25932609```
0 commit comments