
Updated product note
This article was rewritten to match the current early-access API. Models not returned by GET /v1/models are not available through DocsRouter.
Invoice automation needs two separate layers: OCR to extract content and application code to validate business rules. DocsRouter handles the OCR layer; approval thresholds, accounting integrations, and exception handling remain in your application.
Extract an invoice
curl -X POST https://api.docsrouter.com/v1/ocr \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/invoice.pdf",
"strategy": "balanced",
"options": {"extract_tables": true, "output_format": "json"}
}'For multi-page input, inspect every entry in result.pages. Treat model-produced JSON and any optional confidence value as untrusted input: validate types, totals, currency, dates, and line-item arithmetic before writing to an accounting system.
Add human review
Define review rules using evidence you can check, such as missing required fields, totals that do not reconcile, unknown vendors, or unusually large payments. DocsRouter does not automatically approve invoices, retry a low-confidence result, or switch to another model.
Test several supported models against a representative, labeled invoice set before choosing an explicit model or static routing policy.