Document type
What this tool does
This tool tells you what a document is. It reads the text (or the scan through OCR) and returns the canonical document type with a confidence score, without extracting the fields.
When to use it
- Sorting an inbox of PDFs before archiving them.
- Deciding which extraction prompt to run afterwards.
- Rejecting documents that are not the expected type.
- Costing a classification pass over many files.
What to expect
You receive document_type, confidence, language, pages and whether OCR was used.
Limitations
- Uses the same canonical type list as
extract-document-fields; anything unknown comes back asother. - Scanned files go through OCR first, so they take longer.
- Up to 100 pages per request.
When it fails
- The document has no extractable text.
- The AI provider is not configured or returns an invalid answer.
- The page limit is exceeded.
Good to know
- Cheaper than extracting fields: the model returns metadata only.
- Chain it with
extract-invoiceorextract-document-fields.
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. |
language | No | auto | Document language: leave it in "auto" to detect it, or force an ISO-639-1 code. |
Output data
| Field | Description |
|---|---|
document_type | Detected canonical document type. |
confidence | Confidence of the classification (0-1). |
language | Detected document language. |
pages | Pages read. |
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.