Metrics
GET /analytics/metrics?range=<range>Returns time-bucketed metrics for the calling organization. Useful for charts, dashboards, and capacity planning.
Query parameters
Section titled “Query parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
range | string | Yes | One of 1h, 24h, 7days, 30days, 3months. The server picks an appropriate bucket size. |
Response
Section titled “Response”{ "range": "24h", "buckets": [ { "ts": "2026-05-18T00:00:00Z", "requests": 1234, "input_tokens": 567890, "output_tokens": 12345, "cost_usd": 1.23, "errors": 5, "p50_latency_ms": 420, "p95_latency_ms": 1850 } ]}Caching
Section titled “Caching”Responses are cached for 120 seconds with singleflight deduplication — repeated calls within that window hit the cache and don’t re-query the analytics backend.
API key or JWT + X-Org-ID. See Authentication.