Analytics
Where Logs show you one request at a time, Analytics rolls every request up into the numbers a team actually plans around: how much you’re spending, how fast you’re responding, how many tokens you’re burning, and where it all goes — by provider, model, key, or user, over any time range.
- Control spend. See total cost and its trend at a glance, then break it down to find the model or team driving it.
- Catch regressions. Latency percentiles and error rate over time tell you when something got slower or started failing.
- Prove ROI. Cache-hit rate and token volume show the savings the gateway is delivering.
Analytics is built from three endpoints. All three accept the same scope filters — start_time, end_time, organization, workspace_id, provider, and model — so you can zoom the whole dashboard to a workspace, a provider, or a window in time.
A single snapshot for the selected scope (GET /v1/analytics/summary):
| Field | Meaning |
|---|---|
| total_requests | How many requests were served. |
| total_cost_usd | Total spend in USD. |
| total_tokens / prompt_tokens / completion_tokens | Token volume, split by input vs output. |
| avg_duration_ms | Average end-to-end latency. |
| p50_duration_ms / p95_duration_ms / p99_duration_ms | Latency percentiles — the tail, not just the average. |
| error_rate | Share of requests that failed. |
| cache_hit_rate | Share of requests served from cache. |
One metric plotted over time (GET /v1/analytics/timeseries). Pick the metric (required) and a granularity (bucket size; defaults to day). The response is a list of { timestamp, value } points.
| metric | Plots… |
|---|---|
| requests | request volume over time. |
| cost | spend over time. |
| tokens | token consumption over time. |
| latency | response time over time. |
| error_rate | failure rate over time. |
| cache_hit_rate | cache effectiveness over time. |
Group the totals by a dimension to find the biggest contributors (GET /v1/analytics/breakdown). Pick a dimension (required) and an optional limit (defaults to 20). Each row reports request_count, error_count, total_cost_usd, total_tokens, and avg_duration_ms for that group.
| dimension | Groups by… |
|---|---|
| provider | each provider (OpenAI, Anthropic, …). |
| model | each model. |
| organization | each organization. |
| user_id | each user. |
| virtual_key_slug | each virtual key. |
| cache_status | hit vs miss vs bypass, etc. |
Workspace members and above can view analytics for their workspace; org admins see the whole org. Scope to a workspace with workspace_id. Full breakdown on the Access Control page.
Developer API reference
| Method | Path | Who can call it |
|---|---|---|
| GET | /v1/analytics/summary | Member (scope to a workspace) |
| GET | /v1/analytics/timeseries | Member |
| GET | /v1/analytics/breakdown | Member |
# Headline numbers for a workspace, this month
GET /v1/analytics/summary?organization=acme&workspace_id=<uuid>
&start_time=2026-06-01T00:00:00Z
# Daily spend trend
GET /v1/analytics/timeseries?metric=cost&granularity=day&organization=acme
# Top 10 models by cost
GET /v1/analytics/breakdown?dimension=model&limit=10&organization=acme
Authorization: Bearer va_...