Use Cases + Implementation

How do you reduce the cost of data extraction with model routing?

Extraction cost is driven by document messiness and retries. Use JSON mode with a strict schema, route clean, well-structured documents to plugsky-micro or plugsky-lite, and escalate scans, mixed layouts and unusual formats to stronger tiers. Validate everything deterministically before retrying, because a validation error caught in code is cheaper than another model call.

Key facts

Router modelplugsky-fusion escalates per request across tiers (live)
JSON modeLive for strict extraction schemas
Models30+ models; cheap tiers handle clean, consistent documents
ValidationSchema checks in code before any retry
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 extraction pipeline
RoadmapThe batch endpoint is coming soon for large extraction runs

TL;DR

  • Schema first: extraction quality is a contract problem.
  • Route clean documents cheap; escalate scans and odd layouts.
  • Validate in code before spending a retry on the model.
  • Deduplicate identical documents and cache their extraction.
  • Measure cost per accepted record, not per call.

How it works, step by step

  1. Define the target schema with types, enums and required fields for each document type.
  2. Tier documents by quality: clean digital text, semi-structured, scanned or unusual.
  3. Route clean documents to cheap tiers with JSON mode and a compact instruction.
  4. Escalate low-quality or schema-failing documents to stronger tiers.
  5. Validate every response in code; retry once with the validation error, then queue for review.
  6. Cache extractions by document hash so reprocessing is free.
  7. Track acceptance rate and cost per accepted record per document type.
1Define the targetschema with types,enums and required2Tier documents byquality: cleandigital text,3Route cleandocuments to cheaptiers with JSON4Escalatelow-quality orschema-failing5Validate everyresponse in code;retry once with the6Cache extractionsby document hash soreprocessing is

Try it yourself

Open the JSON mode tester →

Extraction is a schema problem first

Most extraction failures are contract failures: the model returned a value in the wrong shape, invented a field, or missed a required one. Fix the contract and many failures disappear. Define a strict JSON schema with types, enums and required fields, request it with JSON mode, and validate responses in code before anything downstream touches them.

Then segment the corpus by difficulty. Clean digital documents with consistent layouts are ideal cheap-tier work. Scans, handwriting, tables spanning pages and multi-column layouts deserve stronger models or a preprocessing step that normalises them first. Feeding everything to one tier either overpays or under-delivers.

Routing and retry discipline

Retries are the quiet cost multiplier in extraction. A failed call that is retried blindly pays twice for the same reason. Make retries evidence-driven:

  • Validate in code and append the specific validation error on the one allowed retry.
  • Escalate rather than loop: a second failure on the same document type should change the tier, not repeat it.
  • Cache by document hash so re-running a pipeline does not re-pay for unchanged files.
  • Queue exhausted items for human review with the raw response attached.

This turns a variable, unbounded cost into a bounded one: one cheap attempt, at most one escalated attempt, then a person.

Quality and cost per accepted record

The metric that matters is cost per accepted record: calls, retries and human corrections divided by records that passed validation and review. Per-call cost hides retry inflation; per-record cost exposes it, and it makes tier comparisons honest.

Build a labelled sample per document type and measure field-level accuracy after every prompt, schema or tier change. Migration between layouts is the common regression trigger, so version schemas per document type. The batch endpoint is coming soon for large runs; until then use bounded-concurrency workers. Start on the free plan with plugsky-micro and plugsky-lite and use the 14-day full-access trial for stronger models on hard documents — plans are on the live pricing page.

Honest comparison

Extraction choiceRouted extraction on PlugskyStrong model for everythingOne cheap model for everything
Clean documentsCheap tier with JSON modeFrontier price per pageReliable
Scans and odd layoutsEscalated or preprocessedNative strengthFrequent schema failures
RetriesValidation-driven, cappedOften unboundedOften unbounded
Duplicate documentsHash-based cachingPaid againPaid again
EconomicsCost per accepted recordCost per callCost per call

Frequently asked questions

Why is extraction more expensive than it looks?

Retries and messy inputs inflate cost. A document that fails schema validation and is retried blindly pays twice, and scans or multi-column layouts often fail on cheap tiers.

Should all documents use the same model?

No. Clean, consistent documents are cheap-tier work. Escalate scans, unusual layouts and documents that fail validation, and consider preprocessing to normalise hard inputs.

How does JSON mode help?

It enforces a machine-checkable schema, so validation happens in code before downstream systems see the data. That reduces silent corruption and unnecessary retries.

How many retries should I allow?

One, with the validation error appended. If the second attempt fails, escalate the tier or queue for human review instead of looping on the same configuration.

Can I cache extractions?

Yes. Hash the document and cache the validated result, so unchanged files never pay twice when pipelines re-run.

Is batch extraction available?

Not yet — the batch endpoint is coming soon. Today, run bounded-concurrency workers with a durable queue and per-document status.

What metric should I track?

Cost per accepted record, alongside field-level accuracy on a labelled sample per document type. Per-call cost hides retry and correction overhead.

Can I build the pipeline for free?

Yes. plugsky-micro and plugsky-lite are on the free plan with no card, and the 14-day full-access trial covers stronger tiers for hard documents.