过去两年里部署了智能体的每家公司,如今都在问同一个问题:它们到底花了我们多少钱,哪些才值得?OpenRouter 的 Activity 仪表盘和 beta Analytics API可以按智能体、按模型、按请求来回答这个问题。
打开 Activity,即可查看支出如何在各个智能体、应用和团队成员之间拆分。了解哪些模型和任务推高了成本,以及缓存在哪里帮你削减账单。创建并保存自定义视图,然后从任意图表下钻到单个请求。
所有数据都可以通过 beta Analytics API获取。把你的智能体指向 openrouter-analytics 技能,即可深入分析你的用量,在终端里快速得到答案,或者把数据拉进你自己的仪表盘。
从全局概览开始
Overview让你一眼看清用量。顶部有五个指标:总支出、请求数、token 量、缓存命中率和每百万 token 的综合成本,每个指标都配有迷你趋势图以及与上一周期的对比。同一屏幕上还有你的头部用户和应用、按模型划分的支出、OpenRouter 额度与 BYOK 支出的对比、按模型划分的请求量、提示词与补全 token 的拆分,以及提示词缓存。


趋势采用相同的数据,但按变化幅度而非规模大小排序,并配有一个面板展示哪些在上升、哪些在下降。查看你在模型、用户、API 密钥和应用上的趋势。用它来发现失控的智能体、正在获得关注的新模型,或在你的组织内扩散的工具。


探索任意问题
概览和趋势上的每一张卡片都会链接到探索,在那里你可以自行组装视图:
- 指标:支出、请求数、token(提示、补全、推理或缓存)、缓存命中率、每百万 token 的混合成本、BYOK 与额度支出对比,或延迟和吞吐量,精确到 P50/P90/P99
- 分组依据(最多两个维度):模型、变体、提供商、API 密钥、应用、用户、工作区、来源、国家、数据区域、结束原因、上下文长度、会话、生成、自定义用户 ID,或你定义的任意分类器维度
- 汇总:分钟、小时、天、周或月,或去掉时间轴以生成排名表格
- 图表类型:柱状图、折线图或点图
用它来查看哪些应用在推动每个工作区的用量、你的智能体针对每种任务类型正在使用哪些模型,或你的提供商延迟随时间的变化趋势。



保存你的常用视图。打开选项菜单,选择保存当前图表,然后为其命名。在组织账户中,你还可以选择谁可以看到它:仅自己,或我组织中的所有人。

下载 CSV或下载 PDF,将任意图表的数据直接发送到电子表格或报告中。
护栏展示你的提示词注入和敏感信息规则拦截、脱敏或标记了什么,以及哪些规则在发挥作用。用它来监控进入提示词的敏感数据速率,以及哪些规则和数据类型正在捕获这些数据。按工作区或分类器筛选,以缩小范围定位数据来源。

展开卡片可查看完整明细,包括哪些检测到的模式组合触发了每次拦截、脱敏和标记。

点击图表,直达日志
聚合数据告诉你某些东西变贵了。下一个问题是:哪些请求。
Activity 中的每个图表和排名表都可以链接到其背后的日志。点击周二的柱状条、堆叠图中某个模型的切片,或排名表中的某一行,你就会进入日志,并筛选出那些请求。

在 日志 中打开任意一行,即可查看 生成 详情视图。它会显示:
- 成本:上游推理、缓存、网页搜索和文件处理,以及所应用的折扣和缓存节省
- 性能:提供商延迟、吞吐量和首 token 时间
- 路由:由哪个提供商处理了该请求、是否回退到了另一个提供商,以及结束原因
- 归属:背后的应用、API key 和工作区,以及会话和请求 ID 与数据区域
- 上下文:任何护栏事件、分类器标签以及原始元数据


提示词 详情视图会渲染完整的 messages 数组,以及一张按角色着色的每条消息预估 token 火焰图:system、user、assistant 和 tool。如果一段对话的花费是你预期的三倍,通常在这里会显示为一大片工具调用带或一个沉重的 system 提示词。被缓存的 prefix 会以阴影标出,因此你可以看到缓存覆盖到了提示词的哪个位置,以及是哪条消息打断了缓存。

每条消息的 token 数量是根据消息大小估算得出的;而生成记录本身的总量则是实际记录的用量。只有当请求运行时启用了私有输入/输出日志记录,提示词和补全的详细信息才会存在,你可以在工作区的可观测性设置中启用该功能。
与 Explore 相同的数据,通过 API 获取
Explore 中的所有内容也都可以通过 beta Analytics API 获取:让你的智能体运行分析、在终端中快速获得答案,或者将数据拉取到你自己的仪表盘中。Analytics 查询需要 management key。两个端点:
GET /api/v1/analytics/meta返回当前支持的指标、维度、过滤运算符和粒度。先调用 metadata 端点查看有哪些可用内容;我们一直在添加新的指标和维度。POST /api/v1/analytics/query运行查询并返回与 Explore 图表所依据的相同聚合数据。
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
}' 面向智能体
成本控制手册让你的智能体负责支出分析。给你的编程智能体一个 management key 和 openrouter-analytics skill,让它对你的 OpenRouter 账户进行成本审查。它会找出每百万 token 成本达到你混合费率数倍的模型,追溯到负责的 key 和流水线,并返回排序后的建议。
我们在内部运行了这个,发现一个预览模型每月烧掉约 $6.2K,大约是组织综合费率的 25 倍。一次下钻查询之后,其中 98% 都追溯到一个单一的批处理管道 key,它在运行一个根本不需要前沿模型的任务。修复方案只是换一行模型。查看我们使用的查询配方和智能体提示词,见 cookbook。
Open Activity,或者如果你已经知道自己想回答什么问题,就从 Explore 开始。如果想改从终端操作,获取一个 management key 并使用 beta Analytics API。
在 Discord 的 #feedback 中告诉我们你接下来想看到什么。
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/metareturns 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/queryruns 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.
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.