Skip to main content

Dashboard: Usage

The Usage page provides aggregate analytics and per-request logs across all projects. Use it to understand spending patterns, investigate errors, and drill into individual request traces.


Summary Statistics

The top row shows aggregated totals for the selected filter set:

  • Total cost (USD)
  • Total call count
  • Success rate
  • Error count
  • Average latency

Filters

FilterDescription
Date rangeStart and end date/time picker
ProjectFilter to one or more projects
ModelFilter to specific model IDs
Typechat, responses, messages
Outcomesuccess, error, budget_exceeded, timeout

Filters are applied immediately; the page updates in real time.


Usage Table

The table lists individual requests with:

ColumnDescription
TimestampWhen the request arrived
ProjectThe project the request belonged to
ModelProvider model used
TypeAPI type (chat, responses, messages)
StatusOutcome
Input TokensInput token count
Output TokensOutput token count
CostEstimated cost in USD
LatencyTime to first byte / total response time

Click any row to open the full Trace view.


Trace View

The trace view shows the complete lifecycle of a single request:

  1. Router Request — the routing engine's input: the project slug, requested model (if any), and active policies
  2. Router Response — which model was selected and why (policy scores listed)
  3. Model Request — the actual payload sent to the provider
  4. Model Response — the raw provider response including all tokens and finish reason

This detail is useful for debugging unexpected model selections, routing failures, or provider errors.


Live Polling

The usage table can auto-refresh to show new requests as they arrive. Use the interval selector in the top-right:

IntervalMeaning
5 sRefresh every 5 seconds
15 sRefresh every 15 seconds
30 sRefresh every 30 seconds
1 minRefresh every minute
5 minRefresh every 5 minutes
NowManual refresh only

Exporting Usage Data

Usage data is stored in ~/.routerly/data/usage.json as newline-delimited JSON. You can process it with any standard tool:

# Total cost this month
cat ~/.routerly/data/usage.json | \
jq -r 'select(.timestamp | startswith("2025-07")) | .cost' | \
awk '{sum+=$1} END {printf "Total: $%.4f\n", sum}'

For programmatic access, use the Usage API.