Skip to content

Metrics

GET /analytics/metrics?range=<range>

Returns time-bucketed metrics for the calling organization. Useful for charts, dashboards, and capacity planning.

These metrics exclude every request routed to your organization’s own provider connection, whether it was served or refused.

ParameterTypeRequiredDescription
rangestringYesOne of 1h, 24h, 7days, 30days, 3months. The server picks an appropriate bucket size.
{
"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
}
]
}

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.