Skip to main content
Classification answers a narrow question: what kind of document is this? The /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:
  1. Analyzes every page of the document.
  2. Scores each page against your candidate categories using a vision-language model.
  3. 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.
For the full request and response specification, see the Classify API reference.