现在,你可以通过结构化元数据自动对 OpenRouter 生成的输出进行分类,用于 AI 使用情况报告。
每一次请求都携带信息:工作类型、复杂程度、来自哪个部门、是否包含不应存在的内部数据。现已推出测试版的分分类器,能让你获得这种可见性。定义你的标准(任务类型、智能体复杂度、合规类别、成本中心)。你选择的模型会根据你的分类体系对每次生成(或抽样子集)进行标记,并将结果写入日志。你就能持续了解你的智能体和用户正在做什么、他们针对不同任务使用哪些模型,以及成本流向何处。
在工作区设置中创建分类器,或先阅读文档。
选择一个模板,或定义你自己的分类体系。
分类器是一个小型配置,包含四个部分:一个分类体系(最多八个维度,每个维度包含你选择的值)、一个分类提示词(作为系统消息发送给分类器模型的指令)、一个用于读取每条提示词并应用它的模型,以及一个采样率。分类在每次请求完成后异步运行,因此绝不会给推理路径增加延迟。
从六个预设模板中选择,自定义一个模板,或从头构建你自己的模板。
| 模板 | 它标记的内容 |
|---|---|
| 部门 | 发起请求的业务职能:工程、销售、市场、法务等。有助于了解组织内哪些部门驱动了推理成本。 |
| 受众 | 输出面向的对象:内部使用、面向客户、监管机构或公众。为依赖模型输出阅读者的合规工作流提供支持。 |
| 任务类型 | 模型正在执行的任务:编程、智能体工作流、数据处理、内容写作。有助于检查每个任务是否使用了合适层级的模型。 |
| 工程工作 | 功能开发、错误修复、文档编写、重构、代码审查。适合追踪 AI 在哪些方面提供帮助,以及每种工作使用了哪些模型。 |
| 智能体复杂度 | 难度等级(从简单工具调用到前沿专家级工作)加上任务类别。适用于运行智能体的团队,对他们而言,“哪个模型很好地处理了困难任务”才是关键问题。 |
| 可资本化的软件支出 | AI辅助的工程工作是否属于可资本化的开发,还是属于维护、运营或支持。 |
选择你的分类模型。我们推荐 Gemini 3.5 Flash Lite,以获得最佳性价比:价格低廉,在结构化输出上准确率高,足以应对大多数分类体系。你可以随时更换模型。
在高吞吐量下,对每个请求进行分类的成本会累积。使用采样率来控制成本。以 100% 的比例运行一个高保真度的合规分类器,同时让一个更宽泛的成本归属分类器对同一流量中的 10% 进行采样,从而使成本与你所需的监管力度成正比。
日志中的结构化标签
分类器的输出会被强制转换为结构化格式,并限制在你定义的维度和值范围内。每次分类生成的结果都会在你的日志中被标记,这样你就可以根据分类来筛选请求。例如,你可以提取所有标记为“部门:法务”或“智能体复杂度难度等级:复杂多步骤”的请求。每个被标记的生成结果的详情面板会分解出分类的维度和值。
你还可以按需对任何历史生成结果运行分类器,以验证新的分类体系。在你的日志中打开它,选择一个分类器,然后查看它如何被标记。

在活动分析中汇总
生成结果上的单个标签回答了“这个请求是什么?”这个问题。活动分析器则回答汇总性问题:按任何分类器维度对你的流量进行分组,查看每个任务类型或智能体复杂度级别使用了哪些模型,以及哪些部门或任务消耗了最多的费用。
结果会随时间汇总;观察数据中的模式变化,并向利益相关者展示你的 AI 使用情况是如何被治理的。分类器筛选条件会跨活动标签页生效,这样你就可以根据任何分类器值查看趋势和护栏执行情况。

分类器现已在测试版中提供。在你的工作区中创建一个分类器,或阅读文档以了解更多关于分类体系设计、计费以及分类工作原理的信息。即使禁用了输入和输出日志记录,分类器也能正常工作。
请在 Discord 的 #feedback 频道告诉我们你的想法。
You can now automatically classify your OpenRouter generations with structured metadata for AI usage reporting.
Every request carries information: the type of work, the level of complexity, which department it came from, whether it contains internal data it shouldn’t. Classifiers, now available in beta, give you that visibility. Define your criteria (task type, agent complexity, compliance category, cost center). A model of your choice tags each generation, or a sampled subset, against your taxonomy and write the results to your logs. You get continuous visibility into what your agents and users are doing, which models they’re using for different tasks, and where the costs go.
Create a classifier in your workspace settings, or read the docs first.
Pick a template or define your own taxonomy
A classifier is a small config with four parts: a taxonomy (up to eight dimensions, each with the values you choose), a classification prompt (instructions sent to the classifier model as a system message), a model to read each prompt and apply it, and a sampling rate. Classification runs asynchronously after each request completes, so it never adds latency to your inference path.
Choose from six preset templates, customize a template, or build your own from scratch.
| Template | What it tags |
|---|---|
| Department | Which business function originated the request: engineering, sales, marketing, legal, and so on. Useful for seeing which parts of the org drive inference cost |
| Audience | Who the output is for: internal use, client-facing, regulators, or the public. Feeds compliance workflows that depend on who reads a model’s output |
| Task type | What the model is doing: coding, agent workflows, data processing, content writing. Useful to check whether the right tier of model is being used for each task |
| Engineering work | Feature development, bug fixing, documentation, refactoring, code review. Good for tracking where AI is helping and which models are used for each type of work |
| Agent complexity | Difficulty tier (from trivial tool calls to frontier-expert work) plus task family. For teams running agents, where “which model handled a hard task well” is the question that matters |
| Capitalizable software expense | Whether AI-assisted engineering work is potentially capitalizable development versus maintenance, operations, or support |
Select your classification model. We recommend Gemini 3.5 Flash Lite for the best value: cheap, strong accuracy on structured output, good enough for most taxonomies. You can change the model at any time.
At high throughput, the cost of classifying every request adds up. Use the sampling rate to keep costs down. Run a high-fidelity compliance classifier at 100% while a broader cost-attribution classifier samples 10% of the same traffic, keeping costs proportional to the oversight you need.
Structured tags in your logs
Classifier outputs are coerced into structured formats, constrained to the dimensions and values you define. Every classified generation is tagged in your logs, so you can filter requests by classification. For example, you can pull every request tagged department: legal or agent_complexity_difficulty_tier: complex_multistep. Each tagged generation’s detail panel breaks down classified dimensions and values.
You can also run a classifier on demand against any past generation to sanity-check a new taxonomy. Open it in your logs, pick a classifier, and see how it gets tagged.

Roll it up in Activity
Individual tags on generations answer “what was this request?” The Activity Explorer answers the aggregate questions: group your traffic by any classifier dimension to see which models are being used for each task type or level of agent complexity, and which departments or tasks drive the most spend.
Results are aggregated over time; watch patterns shift in your data and show stakeholders how your AI usage is governed. Classifier filters carry across the Activity tabs so you can see trends and guardrail enforcement by any classifier value.

Classifiers are available now in beta. Create a classifier in your workspace or read the docs to learn more about taxonomy design, billing, and how classification works under the hood. Classifiers work even with input & output logging disabled.
Tell us what you think in #feedback on Discord.