OpenRouter Classifiers: Track AI API Usage, Cost and Compliance

On July 24, 2026, OpenRouter launched Classifiers — a beta feature that automatically tags every AI API generation with structured metadata. Instead of staring at a flat list of API calls and guessing which department or task they belong to, Classifiers let you define a taxonomy (up to eight custom dimensions), and a small model tags each request asynchronously against those rules. The result: cost attribution by business unit, compliance oversight by audience type, and model-selection intelligence by task complexity — all without adding a millisecond of latency to your inference path.

What Are OpenRouter Classifiers?

A Classifier is a small configuration with four parts:

  • Taxonomy — Up to 8 dimensions, each with the values you choose. For example, dimension "department" with values: engineering, sales, marketing, legal.
  • Classification prompt — Instructions sent to the classifier model as a system message, defining how to apply the taxonomy.
  • Model — A small, fast model (OpenRouter recommends Gemini 3.5 Flash Lite) that reads each prompt and applies the taxonomy.
  • Sampling rate — What percentage of requests to classify. Run compliance classifiers at 100% and cost-attribution classifiers at 10%.

Classification runs asynchronously after each request completes. Zero added latency. The tags are written directly to your OpenRouter logs, where you can filter by any dimension value.

Six Preset Templates — Pick One or Build Your Own

OpenRouter ships with six preset templates that cover the most common classification needs:

Template What It Tags Use Case
DepartmentEngineering, sales, marketing, legal, etc.Cost attribution by business unit
AudienceInternal, client-facing, regulators, publicCompliance and content governance
Task TypeCoding, agent workflows, data processing, content writingModel selection optimization
Engineering WorkFeature dev, bug fixing, docs, refactoring, code reviewDeveloper productivity tracking
Agent ComplexityTrivial tool calls to frontier-expert workAgent workload profiling
Capitalizable SoftwareDev vs maintenance vs operations vs supportAccounting and GAAP compliance

You can start with any template, customize it, or build a taxonomy from scratch. Each dimension supports up to the values you define — there is no hard limit on the number of values per dimension.

How Classification Works — Async, Zero-Latency, Configurable

The classification pipeline has four stages:

  1. Create a Classifier in your OpenRouter workspace settings. Select a template or define a custom taxonomy with up to 8 dimensions.
  2. Choose a model to run the classification. Gemini 3.5 Flash Lite is recommended for best value — it is cheap, fast, and strong at structured output. You can change the model any time.
  3. Set the sampling rate. At 100%, every generation is classified. At 10%, one in ten is sampled. This keeps costs proportional to the oversight you need.
  4. Read the tags in your OpenRouter logs. Every classified generation carries its dimension values as structured metadata, filterable in the Logs view and aggregatable in the Activity Explorer.

Here is how you might set up a Classifier for a multi-department AI deployment:

# Example classifier configuration (conceptual)
# 1. Create a classifier with Department + Task Type dimensions
#    via OpenRouter workspace settings or API

# 2. Gemini 3.5 Flash Lite classifies each generation asynchronously
#    Tags appear automatically in OpenRouter logs:
#    department: engineering
#    task_type: coding
#    audience: internal

# 3. Filter logs by classifier dimension:
#    GET /logs?classifier_department=engineering

Activity Explorer — Aggregate, Trend, and Act

The Activity Explorer takes classification data from individual logs and answers aggregate questions: Which models are used for each task type? Which department drives the most spend? How does agent complexity correlate with cost?

You can group your traffic by any classifier dimension across any time range. The Trends view shows usage patterns over time — useful for spotting when a department AI spend doubles month-over-month. The Guardrail integration lets you set spending or usage limits based on classifier dimensions.

Pricing — Classifier Costs vs Savings

The classifier itself has no separate fee — you pay only for what the classification model consumes. With Gemini 3.5 Flash Lite at roughly $0.05 per million input tokens, classification adds a fraction of a percent to most workloads.

The real savings come from visibility. A team that classifies 100% of traffic with a Department + Task Type taxonomy can immediately identify which departments API bill is growing fastest, which task types are using expensive frontier models when a smaller model would suffice, and whether client-facing outputs are using approved model versions.

Combined with OpenRouter existing Prompt Caching (which cuts cached reads to 0.1x input price) and Sticky Routing (which pins the warm provider across multi-turn conversations), Classifiers complete the cost-control toolkit: cache what you can, route where it is cheap, and classify so you know where the money goes.

Compliance and Governance Use Cases

Classifiers are not just about cost tracking. The Audience template tags outputs as internal, client-facing, regulatory, or public — making it easy to audit whether regulated outputs were generated by a compliant model version. The Capitalizable Software Expense template helps engineering orgs separate capitalizable development from maintenance for GAAP accounting.

Classifiers vs OpenAI Moderation vs Anthropic Safety

The API ecosystem is converging on classification, but each provider approach targets a different need. OpenRouter Classifiers focus on cost, compliance, and usage attribution with custom taxonomies and configurable sampling. OpenAI Moderation API focuses on content safety (hate, harassment, violence) with fixed categories. Anthropic built-in safety classifiers focus on cyber, biology, and CBRN risks with always-on classification. The key differentiator: OpenRouter Classifiers work across 70+ upstream providers from a single integration.

Current Limitations (Beta)

  • Beta stability — Classification models and processing infrastructure may change. Taxonomy data is not guaranteed for dependent workflows during beta.
  • 8-dimension cap — The maximum of 8 dimensions is generous for most use cases, but teams with very fine-grained attribution needs may need to layer multiple classifiers.
  • Model selection affects accuracy — Classification accuracy depends on the model you choose. Gemini 3.5 Flash Lite is recommended, but teams with specialized taxonomies may need to experiment.
  • OpenRouter dependency — Classifiers only work on traffic routed through OpenRouter. Direct API calls to upstream providers are not classified.

Verdict — A Must-Have for Multi-Provider Teams

OpenRouter Classifiers solve a real pain point that grows as AI API spend scales: knowing where the money goes. The async architecture means zero performance hit. The sampling rate gives cost control over the classification itself. The six presets cover the most common needs, and custom taxonomies handle the rest.

For teams already using OpenRouter for multi-provider routing, Classifiers are a natural addition to the cost-control stack — alongside Prompt Caching and Sticky Routing. For teams managing AI spend across departments or building internal AI platforms, Classifiers provide the visibility that spreadsheets and manual log analysis cannot.

The feature is in beta and free to use (pay only the classification model token cost). Create your first classifier in workspace settings or through the API.