Reliable document extraction for AI agents.
Give it a file and the fields you want. Get back JSON guaranteed to match your schema — or a precise, structured error. Never silently-wrong data.
Watch a messy document become schema-valid JSON.
Three real documents, three schemas. Hit Run extraction and watch the six-stage pipeline — only one stage ever touches a model. Everything here runs client-side.
{
"invoice_number": "string",
"invoice_date": "date",
"total_amount": "number"
}Press Run extraction to send this document through the pipeline.
Agents are impressive — until a real PDF hits them.
Hand a model a scanned receipt or a two-column invoice and it will confidently return something. The question is whether you can trust it.
docapi validates every response against yourschema, verifies the values are actually present in the source text, and repairs what code can repair. When it can't comply, it returns a structured error — not a plausible guess your agent will act on.
Six guarantees between the model and your data.
Every extraction passes through the same checks. None of them are the model grading its own work.
Schema validation
Every response is checked against the exact schema you sent. Wrong shape, wrong type, missing field — it never reaches your agent as “probably fine.”
Grounding check
Each extracted string is verified to actually appear in the source text. Hallucinated values get flagged and confidence drops — silently-wrong data has nowhere to hide.
Long-document chunking
Big docs are split into overlapping windows, extracted, then merged. No silent truncation at the context limit, no quietly dropped pages.
Deterministic date repair
Dates are normalized to ISO in code, not by the model. The 26-05-2025 → year-2605 class of bug simply can’t happen.
One corrective retry
If validation fails, docapi feeds the precise error back once and retries. If it still can’t comply, you get a structured error — never a guess.
Confidence + structured errors
Successful calls carry a confidence signal and grounding warnings. Failures return a typed, machine-readable error your agent can branch on.
One core. Three ways to call it.
A REST endpoint, an MCP tool your agent invokes directly, or a Python call. Same engine, same guarantees behind all three.
curl -X POST https://api.docapi.dev/v1/extract \
-F 'file=@razorpay_receipt.pdf' \
-F 'schema={"invoice_number":"string",
"invoice_date":"date",
"total_amount":"number"}'
"cm-cmt"># → 200 OK
"cm-cmt"># { "data": { ... }, "confidence": 0.98, "warnings": [] }The six-stage pipeline, in order.
Only the understand step can ever cost money or call a network. Everything else is deterministic, local, and free.
What's shipped, and what's next.
The reliability engine is here today. Tap any node in the orbit to expand it and trace its connected milestones.
Free and local today. Hosted when you need scale.
The open-source core is the whole engine — not a crippled demo. A hosted version is coming for teams that would rather not run a model themselves.
Open source
The full reliability engine, Apache-2.0. Clone it, run it, ship it.
- ✓ Apache-2.0 — yours to fork and self-host
- ✓ Runs 100% local via Ollama — $0 per extraction
- ✓ REST API and MCP tool out of the box
- ✓ Schema validation, grounding, date repair, retries
Hosted docapi
An API key instead of a local model. Auth, metering, and scale — built for production agents.
- → API key instead of running your own model
- → Auth, usage metering, and rate limits
- → Seconds, not minutes, on long documents
- → Same engine, same guarantees, zero ops
Early-access list. No spam, one launch email.