Analytics: See where your AI spend goes.
Track spending over time. Break down usage by model, team, API key, and custom tags.
Watch spend find its owner.
How analytics works.
Understand spending trends.
Compare cost and token volume across time windows. Unknown costs stay visible rather than reading as zero.
- Calculated from provider token usage and model list rates at 0% platform fee
- Non-streaming responses return cost and token counts in HTTP headers
- Streaming responses report x-nr-cost-status: unpriced until the stream ends
Attribute usage by model, team, or tag.
Group spend by model, provider, API key, team, or custom request tags, and track end-user IDs.
- Attach up to 16 custom tags per call across x-nr-tags and nrouter_tags
- Tag keys support up to 64 bytes and tag values support up to 256 bytes
- Pass an end-user identifier in user or metadata.user_id for user attribution
Export role-scoped reports.
Owners and Organization Admins filter by team or member and export CSV breakdowns. Members see own usage.
- Owners and Organization Admins group by API key, team, or tag and export CSV
- Members and Viewers are scoped to their own usage by model and provider
- Highlights partial windows and unpriced request counts when scan limits apply
FAQs
How is request cost calculated, and how does it relate to billed spend?
nRouter calculates request cost from provider-reported token usage and published model list rates with a 0% platform fee as our permanent standard pricing. Applicable rates can change with prompt length and service tier. Published charges undergo settlement rounding, and the dashboard tracks calculated usage cost alongside billed spend rather than assuming every breakdown row reconciles to the cent with a rounded ledger charge.
When do cost and token headers appear on non-streaming vs streaming requests?
On non-streaming responses, x-nr-request-cost, x-nr-cost-status: exact, x-nr-input-tokens, x-nr-output-tokens, and x-nr-total-tokens are returned in the HTTP response headers, while zero-valued cache token headers are omitted. On streaming responses, HTTP headers are sent before token usage exists, so the initial response header carries x-nr-cost-status: unpriced and final token usage and cost accounting are recorded after the stream completes.
What happens when a request is marked unpriced?
When pricing or usage is unknown at request time, the gateway omits x-nr-request-cost and emits x-nr-cost-status: unpriced rather than recording a false $0.00. Unpriced does not mean uncharged: those requests can still settle against your credits at the amount reserved before dispatch, and the dashboard highlights unpriced request counts so unknown costs stay visible in your reports.
How do I tag requests and attribute usage to end users?
Pass custom tags in the x-nr-tags request header (key=value,key=value) or the nrouter_tags request body field. You can attach up to 16 tags combined per request (keys up to 64 bytes, values up to 256 bytes). The generic request body metadata field is never parsed for spend tags, and reserved tenancy keys such as team_id, org_id, or organization_id are rejected with HTTP 400. For end-user attribution, pass a customer identifier in user (OpenAI format) or metadata.user_id (Anthropic format).
Who can filter across teams and export CSV reports?
In Advanced Analytics, Owners and Organization Admins can filter across teams and members, group breakdowns by sensitive dimensions (API key, team, and tag), and export reports to CSV. Regular Members and Viewers are scoped to their own usage data, view non-sensitive groupings (model and provider), and cannot export CSV files.
What dimensions and time windows can I group reports by, and when are reports partial?
Advanced Analytics tracks spend and usage across 24-hour, 7-day, 14-day, 30-day, 90-day, 6-month, and 1-year windows, grouped by model, provider, API key, team, or custom tag across Cost vs Usage, Usage, API Keys, Budgets, Errors, Performance, and Agents views. When a high-volume window reaches the aggregation scan ceiling or includes unpriced requests, the dashboard explicitly labels partial windows and unpriced counts. For per-request traces and payload debugging, use Observability.
- Request cost is calculated from provider-reported token usage and published model list rates with a 0% platform fee. Applicable rates can change with prompt length and service tier, and published charges undergo settlement rounding.
- On non-streaming responses, cost and token headers return with the HTTP response, and zero-valued cache token headers are omitted. On streaming responses, initial headers carry x-nr-cost-status: unpriced until the stream completes; when pricing or usage is unknown, requests remain unpriced rather than reading as $0.00 and can settle against credits at the reserved amount.
- Attach up to 16 custom tags per request across the x-nr-tags header and the nrouter_tags body field (keys up to 64 bytes, values up to 256 bytes); generic request body metadata is not read for spend tags. In Advanced Analytics, team and member filters, sensitive groupings, and CSV export require Owner or Organization Admin permissions.