/classify endpoint takes a document (PDF or image) and a list of candidate categories, then returns per-page predictions, an overall classification for the document, and a confidence score on every value.
Use it at the front of an ingestion pipeline when you’re processing mixed batches and need to route each document (or each page) to the right downstream handler. For splitting a single mixed bundle into separate files, see Splitting.
How It Works
After you submit a document and categories, the API:- Analyzes every page of the document.
- Scores each page against your candidate categories using a vision-language model.
- Returns the per-page classification, the overall document classification, and confidence scores throughout.
Common Use Cases
- Healthcare: sort medical records, lab reports, prescriptions, and insurance forms
- Business: categorize invoices, receipts, purchase orders, and contracts
- Financial: sort bank statements, tax forms, and financial reports
- Legal: identify contracts, agreements, legal notices, and compliance forms
Dig Deeper
Getting Started With Classification
Submit a document, define categories, and read back classifications with confidence scores.
Response Format
Browse the canonical classification response with examples for each job state.

