Observability

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.

Why it matters
  • 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.

1 · Summary — the headline numbers

A single snapshot for the selected scope (GET /v1/analytics/summary):

FieldMeaning
total_requestsHow many requests were served.
total_cost_usdTotal spend in USD.
total_tokens / prompt_tokens / completion_tokensToken volume, split by input vs output.
avg_duration_msAverage end-to-end latency.
p50_duration_ms / p95_duration_ms / p99_duration_msLatency percentiles — the tail, not just the average.
error_rateShare of requests that failed.
cache_hit_rateShare of requests served from cache.
2 · Time-series — the trend

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.

metricPlots…
requestsrequest volume over time.
costspend over time.
tokenstoken consumption over time.
latencyresponse time over time.
error_ratefailure rate over time.
cache_hit_ratecache effectiveness over time.
3 · Breakdown — where it goes

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.

dimensionGroups by…
providereach provider (OpenAI, Anthropic, …).
modeleach model.
organizationeach organization.
user_ideach user.
virtual_key_slugeach virtual key.
cache_statushit vs miss vs bypass, etc.
Working on a specific prompt? Prompt analytics are embedded in each prompt page — cost and latency broken down by prompt version, without leaving the editor.
Who can view analytics

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

MethodPathWho can call it
GET/v1/analytics/summaryMember (scope to a workspace)
GET/v1/analytics/timeseriesMember
GET/v1/analytics/breakdownMember
http
# 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_...
Need per-request detail behind any of these numbers? Drill into Logs.