Getting Started
- Navigate to your workspace’s classifiers page: Classifiers
- Click Create classifier
- Pick a preset or build your own from scratch
- Optionally, pick a sampling rate (e.g. you may not want to classify 100% of the requests in the workspace)
- Save and activate the classifier
Only workspace admins and org admins can create and manage classifiers. Members can’t. Each workspace has its own independent classifier.
Classification Presets
Presets are templatized classifiers that you can use as a starting point to customize to your use case, or use as-is. Each comes with a tuned prompt, pre-selected dimensions, and sensible defaults.Build Your Own
If the presets don’t fit, build a classifier from scratch with up to eight individual dimensions per classifier.What is Being Classified?
Before classification, the prompt is serialized into a single labeled transcript inside one user message e.g.:- The full tool schema is not sent; just the tool names.
- Each turn is truncated to a maximum of 5,000 characters. If a turn is truncated, the text will end in
...[truncated]so that classifier understands the text would have continued. - If the classifier model has a meaningfully shorter context than the prompt in question, the classification will fail without affecting the original request. We recommend selecting a model with a large context window.
How Classification Works
Classification runs asynchronously after each generation completes:- Your request finishes and the response returns to your app (zero added latency)
- A classification job is enqueued with a serialized version of your prompt
- The classifier model evaluates the message against your taxonomy using structured outputs
- Tags are written to the generation record and appear in your logs
Billing
Classifier tokens bill like any other generation against your workspace’s credits. You control cost through model choice: picking a small, fast model (like Haiku or Flash) keeps classification costs low. Classification requests are billed against the administrative user who configured the classifier (and not against a particular API key).Failure Handling
If classification fails (timeout, model error, invalid output), the generation proceeds normally with no tags written. Classification failures don’t affect your API responses.Viewing Classifications
Classification tags appear in two places:- Log rows. Classified generations show a tag icon. Hover for a tooltip summary.
- Generation detail panel. Open any classified generation to see a Classifications section with the full dimension-to-value breakdown.
Query classifications with the API
To read classification tags programmatically, use the Analytics query endpoint (POST /api/v1/analytics/query). It’s the same query that powers the Activity Explore view, and it requires a management API key.
Two request fields work with classifiers:
You can combine both fields with the standard
metrics, dimensions, filters, and granularity fields. For the full request and response schema, see the Analytics query endpoint reference.
Find your classifier ID
The API identifies a classifier by its UUID. To find it, open your workspace’s Classifiers page and click one of the classifier’s dimension badges. The Activity Explore page opens with adimension query parameter in the URL in the form clf::<classifier_id>::<dimension_name>. The UUID between clf:: and the next :: is your classifier ID.
Get the tags for each generation
To list the tags for individual generations, group by thegeneration_id dimension and the classifier dimensions you want:
data.data has a generation_id, a department key with that generation’s tag, and the requested metrics. Use the generation_id with GET /api/v1/generation to fetch the rest of the generation’s metadata.
Break down usage by tag
To see spend and request volume per tag value, dropgeneration_id and group by the classifier dimension instead. This example also limits the results to two departments:
Classification runs asynchronously after each generation completes, so the most recent generations might not have tags yet. Generations that the classifier skipped because of its sampling rate never get tags from it.
Workspace Scoping
Each classifier is scoped to a single workspace. Different workspaces can have different classifiers (or none at all). This lets you run a department classifier on your org-wide workspace while a specific project workspace uses a task-type classifier.Tips
- Start with a preset. The Department and Engineering work presets cover the most common use cases. You can customize them later.
- Use a cheap model. Classification prompts are short and well-constrained. Small/inexpensive models with large context windows work best and keep costs minimal.
- Check coverage in your logs. After enabling a classifier, look at recent generations in your logs to verify tags are appearing as expected.