Document fields
What this tool does
This tool reads a document (PDF or image) and returns its structured data: it classifies the document type and extracts the fields that are explicitly present, using the same extraction engine as the document-ingest module.
When to use it
- Reading invoices, contracts or statements into your own system.
- Classifying a folder of documents before archiving them.
- Getting vendor, customer, dates and amounts without manual typing.
- Feeding a pipeline with structured JSON from paperwork.
What to expect
You receive the parsed JSON (document_metadata + fields) plus the detected type, language, confidence, pages and whether OCR was needed.
Limitations
- Scanned pages go through OCR automatically, which costs time and may lose small print.
- The model never invents values: missing data comes back as null.
- Up to 100 pages and 60.000 characters of context per request.
When it fails
- The document has no extractable text, even with OCR.
- The AI provider is not configured or returns an invalid response.
- The page limit is exceeded.
Good to know
- Pass
document_typeto force a type when the detection is ambiguous. - The result follows the same contract as
document-ingest. - Use
transform-ocr-pdffirst if you also need a searchable PDF.
Supported document types (63)
Detection is automatic: the engine classifies the document and extracts its fields. You can force a type with the document_type parameter. Example output for an invoice:
{
"document_metadata": { "type": "invoice", "language": "es", "confidence": 0.95 },
"fields": [
{ "key": "invoice_number", "value": "2026-0142", "type": "string" },
{ "key": "invoice_date", "value": "2026-11-03", "type": "date" },
{ "key": "vendor_tax_id", "value": "B12345678", "type": "string" },
{ "key": "total_amount", "value": "1234.56", "type": "number" },
{ "key": "currency", "value": "EUR", "type": "string" }
]
} Company & HR 6
-
board_resolutionBoard resolution -
certificate_of_originCertificate of origin -
executive_reportExecutive report -
meeting_minutesMeeting minutes -
payslipPayslip -
project_planProject plan
Contracts & legal 31
-
assignment_agreementAssignment of rights -
collaboration_agreementCollaboration agreement -
confidentiality_agreementNon-disclosure agreement (NDA) -
consulting_agreementConsulting agreement -
contractGeneric contract -
distribution_agreementDistribution agreement -
employment_agreementEmployment contract -
franchise_agreementFranchise agreement -
independent_contractor_agreementFreelance / contractor agreement -
joint_venture_agreementJoint venture agreement -
lease_agreementLease agreement -
letter_of_intentLetter of intent -
licensing_agreementLicence agreement -
loan_agreementLoan agreement -
master_services_agreementMaster services agreement -
memorandum_of_understandingMemorandum of understanding -
merger_acquisition_agreementMerger or acquisition agreement -
mortgage_agreementMortgage agreement -
non_compete_agreementNon-compete agreement -
non_solicitation_agreementNon-solicitation agreement -
operating_agreementOperating agreement (LLC) -
partnership_agreementPartnership agreement -
power_of_attorneyPower of attorney -
purchase_agreementPurchase agreement -
sales_agreementSales agreement -
service_agreementService agreement -
severance_agreementSeverance agreement -
shareholders_agreementShareholders' agreement -
stock_purchase_agreementShare purchase agreement -
supply_agreementSupply agreement -
term_sheetTerm sheet
Finance & accounting 14
-
balance_sheetBalance sheet -
bank_statementBank statement -
cash_flow_statementCash flow statement -
credit_noteCredit note (refund) -
debit_noteDebit note -
expense_reportExpense report -
financial_statementFinancial statements -
payment_confirmationPayment confirmation -
profit_and_lossProfit and loss account -
reimbursement_claimReimbursement claim -
remittance_adviceRemittance advice -
tax_returnTax return -
utility_billUtility bill -
vat_declarationVAT declaration
Purchasing & logistics 12
-
air_waybillAir waybill -
customs_declarationCustoms declaration -
delivery_noteDelivery note -
delivery_receiptDelivery receipt -
goods_received_noteGoods received note -
invoiceInvoice -
packing_listPacking list -
purchase_orderPurchase order -
quotation_proposalQuote or commercial proposal -
receiptReceipt or till ticket -
sales_orderSales order -
shipping_labelShipping label
Input data
| Parameter | Required | Example | Description |
|---|---|---|---|
url | Yes | https://public.downloads.uproc.io/samples/sample.pdf | Public URL of the PDF or image. |
document_type | No | - | Document type: leave it in "auto" to detect it, or force one of the canonical types. |
language | No | auto | Document language: leave it in "auto" to detect it, or force an ISO-639-1 code. |
Output data
| Field | Description |
|---|---|
result | Parsed JSON with document_metadata and fields. |
document_type | Detected canonical document type. |
confidence | Confidence of the type classification (0-1). |
language | Detected document language. |
pages | Pages read. |
chars | Characters sent to the model. |
ocr_used | True when the text came from OCR. |
Frequently asked questions
Do I need to tell the type?
No. The engine classifies the document in the same call. document_type only forces a type when detection is ambiguous.
Does it work with scans?
Yes. If a page has no text layer, OCR is applied automatically before classifying and extracting.
What if a value is missing?
The model never invents: values that are not in the document come back as null.