One parser is rarely optimal
A clean digital PDF does not need the same treatment as a photographed receipt, a scanned contract, or a spreadsheet. Applying OCR to everything can add latency and recognition errors. Applying a vision model to everything can add cost and variance. Applying only text extraction can miss the document entirely.
Routing makes the trade-off explicit. DocParse inspects the source descriptor and processing requirements, then selects an allowed route. Public callers cannot name an internal engine directly, which prevents untrusted input from bypassing service policy.
Cost and egress are policy decisions
Model-backed and external-provider attempts are reserved in D1 before inference. Daily caps fail closed if durable accounting is unavailable. Tenant policy controls whether explicit external OCR or a rescue fallback is allowed, and HTTPS import or webhook destinations can be limited by host.
This design separates capability from default behavior. A customer can validate deterministic parsing in the trial while the service owner approves higher-cost routes for workloads that have been evaluated.
- Deterministic first for text-rich digital documents.
- OCR for image-only pages and supported scanned inputs.
- Layout vision for approved complex visual structure.
- External OCR only through explicit tenant controls and accounting.
Evaluate routes by document cohort
Build an evaluation set that represents the actual workload: digital reports, multi-column papers, scans, tables, slides, and spreadsheets. Score text completeness, reading order, table structure, page attribution, latency, failure rate, and unit cost separately for each cohort.
Keep the route and parser version in every evaluation record. A single average accuracy score hides whether a deterministic path is excellent for 80 percent of files and inadequate for the remaining 20 percent—the exact information routing needs.
Frequently asked questions
Questions teams ask before building
Does DocParse use an LLM for every document?
No. Clean documents can use deterministic parsing. Model-backed routes are selected only when requested evidence and workspace policy support them.
Can API callers force an internal parser?
No. The public API accepts processing intent, while internal route and engine selection remain service-side decisions.
How are external OCR costs controlled?
Provider attempts reserve durable usage records before inference, respect daily caps, and require tenant-level permission.