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

在 Activity 中汇总
针对单次生成的独立标签回答的是“这个请求是什么?”而 Activity Explorer 回答的则是聚合层面的问题:按任意分类器维度对流量进行分组,即可查看每种任务类型或各智能体复杂度层级分别在使用哪些模型,以及哪些部门或任务带来了最多的支出。
结果会随时间进行聚合;观察你的数据中模式如何变化,并向利益相关方展示你的 AI 使用是如何被治理的。分类器筛选条件会在 Activity 各标签页之间保持,因此你可以按任意分类器值查看 趋势 和 护栏 的执行情况。

分类器现已开放 beta 版。在你的工作区中 创建分类器,或阅读 文档 以进一步了解分类体系设计、计费方式以及分类在底层是如何运作的。即使禁用了输入和输出日志记录,分类器也能正常工作。
欢迎在 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.