官方原文全文
Understand your AI usage: every agent, model, and request — OpenRouter Blog
Cailee Moberg ·8/17/2026
Start with the big pictureStart with the big pictureExplore any questionClick a chart, land in the logsSame data as Explore, via APIFor agentsGet started
Every company that spent the last two years deploying agents is now asking the same question: what are they costing us, and which ones are worth it? OpenRouter’s Activity dashboard and beta Analytics API answer that question per agent, per model, per request.
Open Activity to see how spend breaks down across agents, apps, and team members. Find out which models and tasks drive costs, and where caching cuts your bill. Create and save custom views, then drill from any chart down to the individual requests.
All of the data is available through the beta Analytics API. Point your agent at the openrouter-analytics skill to dig into your usage, get a quick answer in your terminal, or pull the numbers into your own dashboards.
Start with the big picture
Overview is your usage at a glance. Five metrics at the top: total spend, requests, token volume, cache hit rate, and blended cost per million tokens, each with a sparkline and a comparison against the previous period. On the same screen, your top users and apps, spend by model, OpenRouter credits versus BYOK spend, request volume by model, prompt and completion token breakdown, and prompt caching.
Trends takes the same data and sorts by movement instead of size, with a panel showing what’s rising and falling. See your trends across models, users, API keys, and apps. Use it to spot a runaway agent, a new model gaining traction, or a tool spreading across your org.
Explore any question
Every card on Overview and Trends links into Explore, where you assemble the view yourself:
- Metric: spend, request count, tokens (prompt, completion, reasoning, or cached), cache hit rate, blended cost per million tokens, BYOK versus credit spend, or latency and throughput down to P50/P90/P99
- Group by (up to two dimensions): model, variant, provider, API key, app, user, workspace, origin, country, data region, finish reason, context length, session, generation, custom user IDs, or any classifier dimension you’ve defined
- Rollup: minute, hour, day, week, or month, or drop the time axis for a ranked table
- Chart type: bar, line, or dot plot
Use it to see which apps are driving usage in each workspace, which models your agents are using for each task type, or how your provider latency is trending over time.
Save your go-to views. Open the options menu, choose Save current chart, and name it. In an organization you also choose who sees it: Only me, or Everyone in my organization.
Download CSV or Download PDF to send any chart’s data straight into a spreadsheet or report.
Guardrails shows what your prompt injection and sensitive-information rules blocked, redacted, or flagged, and which rules are doing the work. Use it to monitor the rate of sensitive data entering your prompts, and which rules and data types are catching it. Filter by workspace or classifier to narrow in on where it’s coming from.
Expand a card to get the full breakdown, including which combinations of detected patterns drove each block, redaction, and flag.
Click a chart, land in the logs
Aggregates show you that something got expensive. The next question is which requests.
Every chart and ranked table in Activity links through to the logs behind it. Click Tuesday’s bar, one model’s slice of a stacked chart, or a row in a ranked table, and you land in your logs filtered to those requests.
Open any row in logs for the Generation detail view. It shows:
- Cost: upstream inference, caching, web search, and file processing, plus the discounts and cache savings applied
- Performance: provider latency, throughput, and time to first token
- Routing: which provider served the request, whether it fell back to another one, and the finish reason
- Attribution: the app, API key, and workspace behind it, plus session and request IDs and data region
- Context: any guardrail events, classifier tags, and the raw metadata
The Prompt detail view renders the full messages array and a flamegraph of estimated tokens per message colored by role: system, user, assistant, and tool. A conversation that costs three times what you expected usually shows it here as a wide band of tool calls or a heavy system prompt. The cached prefix is shaded, so you can see how far into the prompt the cache held and which message broke it.
Per-message token counts are estimates derived from message size; the totals on the generation itself are recorded usage. Prompts and completions detail only exist if private input/output logging was enabled when the request ran, which you can enable in your workspace observability.
Same data as Explore, via API
Everything in Explore is also available through the beta Analytics API: let your agent run the analysis, get a quick answer in your terminal, or pull the numbers into your own dashboards. Analytics queries require a management key. Two endpoints:
- GET /api/v1/analytics/meta returns the currently supported metrics, dimensions, filter operators, and granularities. Call the metadata endpoint first to see what’s available; we’re always adding new metrics and dimensions.
- POST /api/v1/analytics/query runs the query and returns the same aggregates the Explore charts are drawn from.
curl -X POST https://openrouter.ai/api/v1/analytics/query \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"metrics": ["total_usage", "tokens_total", "cache_hit_rate"],
"dimensions": ["model"],
"granularity": "day",
"time_range": {"start": "2026-07-01T00:00:00Z", "end": "2026-08-01T00:00:00Z"},
"limit": 20
}'
For agents
The cost control cookbook puts your agent in charge of spend analysis. Give your coding agent a management key and the openrouter-analytics skill and have it run a cost review on your OpenRouter account. It finds the models costing a multiple of your blended rate per million tokens, traces them back to the keys and pipelines responsible, and returns ranked recommendations.
We ran this internally and found a preview model burning ~$6.2K/month at roughly 25x the org’s blended rate. One drill-down query later, 98% of it traced to a single batch-pipeline key running a task that never needed a frontier model. The fix was a one-line model swap. See the query recipes and agent prompts we used in the cookbook.
Get started
Open Activity, or start in Explore if you already know the question you want answered. To work from your terminal instead, grab a management key and hit the beta Analytics API.
Tell us what you’d like to see next in #feedback on Discord.
当一个团队同时运行多个模型、多个智能体和多条自动化流程时,“这个月花了多少钱”已经不够回答问题。更关键的是:哪一个 agent、哪一类任务、哪一个 API key 正在消耗预算,以及缓存和回退策略是否真的生效。OpenRouter 在 8 月 17 日公布的 Activity 仪表盘与 Beta Analytics API,正是为这类可追踪性问题提供一套可下钻的观察入口。
从总览指标进入单次请求
官方介绍的 Activity 仪表盘可以按 agent、model 和 request 查看支出、请求数、Token 量、缓存命中率以及每百万 Token 的混合成本。Explore 视图还支持按模型、提供商、API key、应用、用户、工作区和会话等维度筛选,让成本不再停留在账户级别的总数。
更有价值的是日志下钻:图表中的异常点可以继续追到单次 generation,查看上游推理、缓存、路由回退、延迟和 Token 明细。对于中转层来说,这意味着“模型变慢”或“账单突然变高”可以被拆成具体请求,而不是依赖人工猜测。
Analytics API 把观察接入工作流
OpenRouter 同时给出 GET /api/v1/analytics/meta 与 POST /api/v1/analytics/query 的接口形态。前者用于确认可用的指标和维度,后者执行分析查询。官方说明查询需要 management key,因此权限边界和密钥管理应与普通推理 key 分开。
- 指标覆盖支出、请求数、Token、缓存命中率和混合成本。
- Explore 支持从模型、供应商、key、应用、用户、工作区和会话等维度筛选。
- 单次 generation 日志可观察回退路径、延迟与 Token 明细。
- 官方内部示例称某预览模型月度消耗约 6200 美元,98% 消耗追溯到单一批处理 key;该数字属于官方示例,不是独立审计结果。
TopoReduce 编辑观察
对 AI 编程工具和 API 中转服务而言,可观测性不是后台附属功能,而是路由策略的一部分。只有把模型、任务、Token、缓存和回退事件串起来,团队才有机会设置预算告警、比较模型真实成本,并在故障复盘后调整默认路由。
下一步的工程重点会从“接入更多模型”转向“让每次调用都可解释”。这也是中转站从简单转发层升级为可治理基础设施的分界线。