Classify a document only
POST/documents/classify
Receives a single file input and classifies the document to identify its type, without running data extraction. Returns the document class, classification confidence and the extracted text, but no knowledge graph or data nodes.
Like the singular extraction endpoint, this accepts either a document (multipart/form-data file upload) or an
uploadId (JSON reference to a previously created upload), records the request, and honours the RFC7240 Prefer
header for document class and context preferences (including handling=strict, which returns a 412 on a mismatch).
Use this when you only need to know what a document is — for example to triage or route an upload — before deciding whether to run a full extraction.
Request
Responses
- 200
- 400
- 412
- 500
Document classified successfully
Invalid file type (not PDF/JPEG/PNG), missing document field, or payload exceeds 4.5 MB
Document class or context did not match the preference specified in the Prefer header with handling=strict
OCR processing failure or document classification error