Use Cases + Implementation

How do you reduce the cost of document processing with model routing?

Document processing mixes deterministic and judgement work. Extract text with your own OCR or parser, classify and clean with cheap tiers, and escalate only pages that need reasoning: ambiguous tables, handwritten notes, exception handling. Process page by page so one difficult page never drags a whole document onto an expensive model.

Key facts

Router modelplugsky-fusion escalates per page request across tiers (live)
PipelineParse or OCR first, then classify, extract and reason per page
Models30+ models; cheap tiers handle cleaned text and routine classification
JSON modeLive for per-page extraction and classification output
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 or document type
RoadmapThe files and batch endpoints are coming soon; parse documents in your own pipeline today

TL;DR

  • Parse or OCR outside the model; pay models for judgement, not pixels.
  • Route per page or per section, not per document.
  • Escalate only hard pages: tables, handwriting, exceptions.
  • Checkpoint long documents so retries do not restart the batch.
  • Measure cost per processed document and per exception.

How it works, step by step

  1. Split the pipeline into parsing, classification, extraction and review stages.
  2. Parse digital documents to text; OCR scans with your own engine before any model call.
  3. Classify document type and section type with cheap tiers and strict schemas.
  4. Extract structured fields per page or section using JSON mode.
  5. Escalate ambiguous tables, handwriting and exception handling to stronger tiers.
  6. Checkpoint progress per page and cache parsed text so retries resume rather than restart.
  7. Track cost per processed document, exception rate and downstream correction rate.
1Split the pipelineinto parsing,classification,2Parse digitaldocuments to text;OCR scans with your3Classify documenttype and sectiontype with cheap4Extract structuredfields per page orsection using JSON5Escalate ambiguoustables, handwritingand exception6Checkpoint progressper page and cacheparsed text so

Try it yourself

Open the tokens-to-pages converter →

The per-page cost stack

A document pipeline has three cost layers: getting text out of the file, deciding what the text is, and doing something useful with it. Only the middle and last layers need models, and only for judgement. Parsing, OCR and format detection are deterministic work that should never be delegated to a chat model.

Processing per page or per section is the key architectural choice. Documents are uneven: page one is a clean header, page forty is a rotated table. Per-page routing sends only the hard page to a strong model while the rest runs cheap, and it makes retries cheap because a failed page can be retried alone.

Separating OCR from reasoning

Vision-language models can read images, but at document scale that is an expensive way to do OCR, and the images endpoint is coming soon rather than live today. Use your own OCR or a deterministic parser first, then send cleaned text to the model. This also gives you a text artifact that is easier to cache, diff and audit than image calls.

  • Normalise OCR output: fix common character confusions and merge broken lines.
  • Keep page and section coordinates so extracted fields can link back to sources.
  • Classify page layouts cheaply before extraction so each layout gets the right prompt.
  • Flag pages where OCR confidence is low and escalate them proactively.

Checkpoints, exceptions and measurement

Long documents fail mid-way, and a pipeline that restarts from page one re-pays for everything. Checkpoint per page, persist parsed text, and resume from the last unfinished unit. Cache parsed output by file hash so reprocessing new versions of the same document only touches changed pages.

Exception handling is where the money hides: pages the pipeline cannot classify, tables that fail validation, and documents requiring human judgement. Measure exception rate per document type, because a rising rate means upstream parsing or prompts regressed. Cost per processed document, including exceptions and corrections, is the number to optimise. Start on the free plan with plugsky-micro and plugsky-lite, then use the 14-day full-access trial for stronger tiers on exception pages; plans are on the live pricing page.

Honest comparison

Processing choiceRouted pipeline on PlugskyVision model per pageCheap model per document
Text extractionYour OCR or parserModel reads every imageSame
Routine pagesCheap tier with JSON modeExpensive per pageCheap and adequate
Hard pagesEscalated per pageUniform costFails silently
RetriesCheckpointed per pageWhole document restartWhole document restart
EconomicsCost per processed documentCost per pageCost per document, hidden errors

Frequently asked questions

Should I use a model for OCR?

Better to parse or OCR deterministically first and send cleaned text to the model. Model-based image reading is expensive at scale, and the images endpoint is coming soon rather than available today.

Why route per page instead of per document?

Documents vary internally. Per-page routing keeps routine pages on cheap tiers and escalates only hard pages, and it makes retries cheap because a failed page can be retried alone.

How do I handle tables and forms?

Classify the layout cheaply, then extract with a schema tailored to that layout. Escalate tables that fail validation instead of running every table through a strong model.

How do I avoid re-paying on retries?

Checkpoint per page, persist parsed text and extraction results, and resume from the last unfinished unit. Cache parsed output by file hash.

What about scanned documents?

OCR them first and flag low-confidence regions. Escalate pages where OCR confidence is low rather than paying a strong model to guess at unreadable pixels.

Are files endpoints available?

Not yet — files and batch endpoints are coming soon. Ingestion, parsing and storage stay in your pipeline today.

How do I measure success?

Cost per processed document including exceptions and corrections, plus exception rate and downstream correction rate by document type. Per-page cost alone hides failures.

Can I pilot 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 models for exception handling.