Key facts
| Endpoint | POST /v1/chat/completions for classification, extraction and validation steps |
| Pipeline stages | Classify, parse, extract, validate and route — each independently testable |
| Files endpoint | Coming soon; document ingestion and parsing run in your infrastructure today |
| Batch endpoint | Coming soon; process queues with bounded concurrency now |
| Models | 30+ models; cheap aliases for classification and stronger ones for difficult extraction |
| Pricing model | Flat monthly self-serve plans with unlimited fair-use usage |
| Free tier | Free plan with 2 free AI models, no card required |
| Governance | Scoped keys, audit logs and per-document traces |
TL;DR
- Break processing into stages; a single prompt cannot classify, extract and validate reliably.
- Put human review on exceptions, not on every document.
- Keep parsing and OCR in your infrastructure — the files endpoint is coming soon.
- Track metrics per stage so failures are attributable.
- Make every step idempotent and traceable per document.
How it works, step by step
- Inventory document types and define the processing path and required output for each.
- Build intake: capture, virus scan, hash and register the document with a stable id.
- Classify with a cheap model and a fixed label enum, then route by type.
- Parse text and structure, and extract fields with JSON mode per document family.
- Validate outputs against schema and business rules; queue exceptions for human review.
- Deliver validated results to downstream systems and log per-stage outcomes for monitoring.
Original data
Try it yourself
Open the RAG architecture builder →
Architecture of a document pipeline
Five stages plus a review lane:
- Intake: register the document, compute a hash, scan for malware and assign a document id.
- Classify: JSON-mode call returns a type from a fixed enum plus a confidence value.
- Parse: text extraction, OCR where needed, and table detection in your infrastructure.
- Extract and validate: per-family schemas, then business-rule checks in code.
- Route: high-confidence outputs proceed; low-confidence or failed items go to human review.
Where agents actually help
Agents are a poor fit for steps that are already deterministic. They earn their place in four situations:
- Mixed document types: a single intake stream containing invoices, contracts and applications that must be separated before processing.
- Content-dependent routing: a scanned package where the next step depends on what the cover page says.
- Exceptions: documents that fail validation and need a bounded investigation — check another section, compare an attachment, look up a reference.
- Multi-document packages: files that must be matched to each other, such as a purchase order and its invoice.
Everything else — parsing, regex extraction, arithmetic checks — should stay in ordinary code.
Implementation and evaluation
Operational discipline keeps the pipeline trustworthy:
- Use the document hash as an idempotency key so reprocessing never duplicates records.
- Version schemas and store the version with every output so old results remain interpretable.
- Keep prompts pinned per document family, and re-run golden sets when they change.
- Route by confidence, not by document type alone; a confident invoice is different from a confident contract.
Metrics per stage: classification accuracy, parse quality (percentage of required text captured), per-field extraction accuracy, validation failure rate, straight-through processing share and exception review yield. Stage-level metrics tell you where to invest; document-level accuracy does not.
Limitations
Honest constraints of the current platform and the problem itself:
- The files and batch endpoints are coming soon; ingest, storage, OCR and queueing are your responsibility today.
- Scanned documents need OCR validation before any model step; poor scans produce confident garbage.
- Complex tables, handwriting and multi-column layouts remain hard and often need specialized tooling.
- Agent loops on high-volume uniform documents add cost without benefit; reserve them for exceptions.
- Never let unvalidated extractions trigger payments, filings or irreversible actions.
Honest comparison
| Capability | Staged pipeline on Plugsky | Manual processing team | Single monolithic script |
|---|---|---|---|
| Mixed document types | Classification stage routes by type | Human judgment | Brittle if/else |
| Exceptions | Bounded agent investigation plus review | Human handles | Fails silently |
| Traceability | Per-stage logs and per-document ids | Notes and folders | Log files |
| Model choice | Per-stage aliases among 30+ models | Not applicable | One model |
| Scale | Queue with bounded concurrency | Hiring | Limited by fragility |
Frequently asked questions
What is agentic document processing?
A pipeline where model-driven stages classify, extract and investigate exceptions, while deterministic code handles parsing, validation and delivery. Agents are used where routing depends on content.
Do I need an agent for every document?
No. Apply agent steps to mixed types and exceptions. Uniform high-volume documents are cheaper and more consistent with single JSON-mode calls.
Where does parsing happen?
In your infrastructure. The files endpoint is coming soon, so text extraction, OCR and storage remain your responsibility for now.
How do I handle exceptions?
Route validation failures and low-confidence items to a human review lane with the source context and extracted values attached, then feed corrected outcomes back into evaluation.
Which models should each stage use?
Cheap aliases such as plugsky-micro or plugsky-lite for classification and routing, with stronger aliases for difficult extraction from legal or financial documents.
How do I measure the pipeline?
Per stage: classification accuracy, parse capture rate, per-field accuracy, validation failure rate, straight-through processing and review yield.
Can I prototype document processing for free?
Yes. Chat completions and JSON mode are live, the free plan includes two free models with no card, and the 14-day full-access trial supports evaluation with paid aliases.