Use Cases + Implementation

How do you reduce the cost of classification with model routing?

Classification is the easiest workload to make cheap because most items are unambiguous. Send bulk labelling to plugsky-micro or plugsky-lite with a tight label set and JSON output, then escalate only low-confidence or unknown-category items to stronger models. Batch your requests, cache repeated inputs, and measure accuracy per label before widening the cheap path.

Key facts

Router modelplugsky-fusion escalates per request across tiers (live)
JSON modeLive for strict label output with confidence fields
Models30+ models; cheap tiers handle high-volume, low-ambiguity labelling
Strategiescost_saver by default, escalation on low confidence or unknown labels
PricingFlat monthly self-serve plans with no per-token charges on self-serve
Free tierplugsky-micro and plugsky-lite on the free plan, no card required
Usage controlsScoped keys and usage analytics per pipeline
RoadmapThe batch endpoint is coming soon for large offline labelling jobs

TL;DR

  • Classify with a fixed label set and JSON output, not free text.
  • Run bulk labelling on cheap tiers; escalate only ambiguous items.
  • Cache repeated inputs — classification inputs repeat more than you think.
  • Keep a human-reviewed gold set and measure accuracy per label.
  • Never let one low-confidence label silently disappear; route it.

How it works, step by step

  1. Freeze the label taxonomy and write one-sentence definitions for each label.
  2. Build a gold set of a few hundred human-labelled items covering every label.
  3. Design a JSON schema with label and confidence, and test it on cheap tiers first.
  4. Route all bulk traffic through cost_saver and capture confidence per item.
  5. Escalate items below a confidence threshold or with unknown labels to a stronger tier.
  6. Deduplicate and cache identical or near-identical inputs before calling the model.
  7. Re-run the gold set after prompt or model changes and track per-label accuracy.
1Freeze the labeltaxonomy and writeone-sentence2Build a gold set ofa few hundredhuman-labelled3Design a JSONschema with labeland confidence, and4Route all bulktraffic throughcost_saver and5Escalate itemsbelow a confidencethreshold or with6Deduplicate andcache identical ornear-identical

Try it yourself

Open the LLM API cost calculator →

Why classification is the easiest win

Classification has a bounded output: one label, maybe a confidence score. That means small models can do it well when the taxonomy is clear, and the same work on a frontier model is mostly waste. The cost profile is also predictable — input length is stable, output is tiny — so savings from tiering show up immediately in usage analytics.

The failure mode is taxonomy ambiguity, not model capability. If two labels overlap, every model struggles and humans disagree too. Fix the definitions first; a clean taxonomy on a cheap tier beats a fuzzy one on the strongest model.

Routing and schema design

Use JSON mode to force a machine-checkable answer and to carry confidence. Validation then happens before the label touches your database.

  • {label, confidence, secondary_label?} keeps escalation decisions explicit.
  • Constrain labels to an enum so invalid categories cannot leak downstream.
  • Send only the fields the decision needs; long noisy inputs reduce accuracy and raise cost.
  • Include short examples in the system prompt rather than long instructions.

Set cost_saver as the pipeline default, then escalate on low confidence, unknown labels or specific high-stakes categories such as safety or compliance items.

Batching, caching and accuracy control

Classification traffic repeats: the same product names, the same ticket templates, the same user queries. Deduplicate before calling the model and cache label results keyed by normalised input, so repeat items cost one lookup instead of a model call. The batch endpoint is coming soon for large offline jobs; until then, run bounded-concurrency workers with a durable queue.

Accuracy governance matters more than raw model strength. Keep a gold set, track per-label precision and recall, and watch for class imbalance where a cheap model learns to over-predict the majority label. Route anything low-confidence to review rather than guessing. Flat self-serve plans keep the bill stable while you tune — see the live pricing page — and the free plan with plugsky-micro and plugsky-lite is enough to build the pipeline.

Honest comparison

Cost leverRouted classification on PlugskyFrontier model for every itemRules and regex only
Bulk labellingCheap tiers with JSON labelsFrontier price per itemFree but brittle
Ambiguous itemsEscalated with confidenceNative strengthMisfiled silently
Repeat inputsCached labelsPaid again every timeCached by definition
Taxonomy changesPrompt update and re-runSame, at high costRewrite rules
Accuracy evidencePer-label metrics on a gold setOften unmeasuredRule coverage metrics

Frequently asked questions

Why is classification cheaper than other AI workloads?

The output is tiny and the task is bounded, so cheap models perform well when the taxonomy is clear. Input duplication is also common, which makes caching effective.

Which model tier should classify?

Start with plugsky-micro or plugsky-lite and measure per-label accuracy on a gold set. Escalate low-confidence or high-stakes categories to stronger tiers. All 30+ models are behind one endpoint.

How do I handle ambiguous items?

Have the model return a confidence score, set a threshold, and route below-threshold items to a stronger model or a human queue instead of forcing a label.

Should I use JSON mode?

Yes. A strict schema with label and confidence prevents prose parsing problems and makes validation a one-line check before storage.

Is the batch endpoint available?

Not yet — batch is coming soon. Today, process items with bounded concurrency in your own workers and a durable queue, and cache repeated inputs.

How do I measure classification quality?

Keep a human-labelled gold set covering every label, then track precision, recall and confusion between labels after each prompt or model change.

What does routing cost on self-serve plans?

Self-serve plans are flat monthly with no per-token charges, so routing mainly affects throughput and latency headroom. See the live pricing page for plan details.

Can I test cheap tiers for free?

Yes. plugsky-micro and plugsky-lite are on the free plan with no card, and a 14-day full-access trial is available to compare stronger tiers.