Skip to content
DocsAnalytics
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. Cache hits cost $0, so this is what was actually spent.
total_cost_saved_usdWhat cache hits saved: what they would have cost (the Saved by cache card).
total_tokens / prompt_tokens / completion_tokensToken volume, split by input vs output.
avg_duration_msAverage duration (see duration_ms on the Logs page).
p50_duration_ms / p95_duration_ms / p99_duration_msDuration 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.
cost_savedwhat the cache saved over time (the chart’s Saved tab).
tokenstoken consumption over time.
latencyduration over time (the chart labels it Duration).
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.
4 · Latency: where the time goes

Latency percentiles over time (GET /v1/analytics/latency), split into the provider’s time and what the gateway added. The Analytics page’s Latency tab draws it for the page’s filters (the last 24 hours when no time range is set), with tabs for Total, Provider, Gateway overhead and Time to first token and an optional range picker of its own (last hour to last 90 days). The answer has a summary for the whole window and one entry per time bucket in data_points, empty buckets included (requests: 0, figures null). Every figure is in milliseconds.

FieldMeasures…
avg, p50, p90, p95, p99, maxtotal latency: from when the request reached the gateway until the whole answer was in. Requests logged before the provider / gateway split existed use their recorded duration.
providertime spent waiting on the provider, every retry and fallback attempt included. Only requests that called a provider; cache hits are left out.
gateway_overheadtotal minus provider time: what VectorAxis added (key checks, guardrails, cache lookups, routing, pricing).
first_tokenstreams only: from arrival until the first chunk reached the caller.
provider_first_tokenstreams only: the provider’s time until its first chunk.

Each of the nested fields has the same requests, avg, percentiles and max. Percentiles are within about 3% of the exact value (exact below 18 ms); averages and maximums are exact. regions lists the regions whose logs were read; a region in unavailable_regions did not answer and is left out of the figures.

ParameterMeaning
organizationDefaults to your va_ key’s organization.
workspace_idOne or more workspaces; you need access to each. Left out: every workspace (org owners and admins). A workspace-scoped va_ key reads its own workspace.
exclude_workspace_idsEvery workspace except these (without workspace_id only).
start_time, end_timeISO 8601 with an offset. Default: the last 24 hours. At most 366 days.
granularityauto (default: by minute up to 3 hours, by hour up to 7 days, by day up to 90 days, then by week), minute, hour, day or week. At most 1,500 buckets.
tzIANA time zone the buckets line up with, e.g. Asia/Kolkata. Default UTC.
provider, model, provider_modelLists. provider_model pairs them: openai__gpt-5,anthropic__claude-opus-5-5.
virtual_key_slug, config_slug, prompt_slug, guardrail_slug, guardrail_status, user_id, request_id, cache_status, operation_type, region, status_codeLists: comma-separated, or the parameter repeated. A request matches when it has any of the values.
status, streaming, tool_scan_status, searchsuccess or error; true or false; as on /v1/logs.
min_tokens/max_tokens, min_prompt_tokens/max_prompt_tokens, min_completion_tokens/max_completion_tokens, min_cost/max_cost (USD), min_duration_ms/max_duration_msRanges, both ends included.
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
GET/v1/analytics/latencyMember (each workspace asked for); org admin for every workspace
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

# Hourly latency of two models' streams, last 24 hours, in India time
GET /v1/analytics/latency?workspace_id=<uuid>&model=gpt-5,claude-opus-5-5
    &streaming=true&granularity=hour&tz=Asia/Kolkata
Authorization: Bearer va_...
Need per-request detail behind any of these numbers? Drill into Logs.
NVIDIA Inception Program member

VectorAxis is built by GK Labs, a member of NVIDIA Inception.