Document extraction API
POST a PDF or image, get back structured JSON. No templates, no model training, no per-vendor setup.
Quick start
curl -X POST https://extractfox.com/api/extract \
-F "file=@invoice.pdf" \
-F "mode=prebuilt" \
-F "schemaId=invoice"
# Response
{
"result": {
"vendor": "Acme Supplies Ltd.",
"invoice_number": "INV-00284",
"issue_date": "2026-04-12",
"line_items": [...],
"subtotal": 232.00,
"tax": 46.40,
"total": 278.40
}
}Endpoints
/api/extractRun extraction on a single document. Returns the JSON object matching the chosen schema.
multipart/form-data with file, mode (prebuilt|custom), schemaId or prompt
/api/infer-schemaGenerate a JSON Schema from a free-text request. Use the result with /api/extract for a two-step pipeline.
multipart/form-data with file, prompt
Schemas
Six prebuilt schemas ship out of the box: invoice, receipt, passport, bank_statement, contract, resume. Pass schemaId with one of these to get the canonical extraction.
For anything else, pass mode=custom with a free-text prompt describing what you want.
Frequently asked questions
Is there a document extraction API I can call?+
Yes. The same /api/extract endpoint powers the app and enforces your account quota. First-party session auth is available now; bearer API keys are not enabled yet.
What's the latency per extraction?+
Typical latency is 2–6 seconds for a single PDF or image, dominated by the model call. Larger documents (multi-page scans) take longer. Pro accounts get priority routing.
Can I use the API to bulk-process documents?+
Yes. Loop on the client with a sensible concurrency cap (3–5 in flight). Server-side monthly quotas still apply to every request.
Does the API support custom schemas?+
Yes. Pass mode=custom with a prompt and the server infers a schema before extracting. Direct JSON Schema submission is not exposed yet.
How do I authenticate?+
Sign in through the app before calling these endpoints. Scoped bearer API keys are planned, but not exposed in the current product.
Use the API
Sign up, choose a plan, and call the same quota-enforced endpoints the app uses.
See pricing