OpenRouter's Analytics API exposes per-agent and per-request spend
- Source
- x.com
- Publisher
- OpenRouter
- Date
Big upgrade to the API powering the Activity dashboard. View and query your AI usage per agent, per model, and per request. Spend, tokens, cache hit rate, latency, and blended cost per token, with drill-down from any chart. Features 👇

Context
OpenRouter's upgraded Analytics API lets a team, or a working for it, query the same usage data that drives its Activity dashboard, so an AI bill can be broken down by model, API key, app, user or individual request. According to OpenRouter's blog post, the query endpoint returns aggregates such as spend, tokens, cache hit rate, blended cost per million tokens and , grouped by up to two dimensions, and every dashboard chart links through to the requests behind it. Queries need a management key; ordinary keys are refused. OpenRouter announced the upgrade in an X post on August 21, 2026.
The use OpenRouter emphasizes is finding one expensive line that a total bill hides. Its cost-control cookbook has an agent compute each model's effective price per million tokens and compare it with the account's blended rate, which is total spend divided by total tokens across all traffic. In OpenRouter's own internal run, that flagged a preview model costing about $6,200 a month at roughly 25 times the organization's blended rate, and a follow-up query traced 98% of that spending to one batch-pipeline key running a task the company says never needed a frontier model. OpenRouter describes the fix as a one-line model swap; the only after-the-fix spending figures in the cookbook are labeled sample output.
- Agent mode — A mode in which one agent can inspect, edit, run commands, and iterate toward an outcome.
- Latency — The time between asking for a result and having it, including the model's generation time, tool calls, retries and any queueing.
- Inference — Using a trained model to produce an output from a supplied input.
- Metadata — Data about a file, such as its name, size and timestamps, as distinct from its contents.





