Send a document and a list of labels. The classify endpoint scores the document against each label and returns a ranked list, so an intake queue can route every file before you extract anything from it. Classification is zero-shot: no training data, no templates.
Trusted by enterprises, governments, and teams building document workflows at scale
HOW IT WORKS
Send at least two labels with the request, or the ID of a classifier you saved in Studio. Each label has a name and an optional description, and the classifier scores against the description as much as the name, so a specific description gives a sharper boundary. Upload the file, or pass the URL of a document that is already hosted.
Each document is scored two ways: once from its extracted text and once from its page images. The two scores are merged into a single ranked list. Dedicated scoring models do the work, not a generative large language model (LLM) or vision language model (VLM).
The response gives the top label and every candidate label with its score, highest first. Each score is an independent confidence from 0 to 1, so a document that fits two labels can score high on both. Compare the top score with the runner-up and send close calls to manual review.
ZERO-SHOT
The API scores each document against the labels in your request, not labels learned from a training set. Switching to a new set of document types means sending a new label list.
ONE CALL
POST a file and your labels to /extraction/classify. The response carries the top label, its score when the engine returns one, and the full ranked list.
Request
Multipart upload with labels
curl -X POST https://api.nutrient.io/extraction/classify \ -H "Authorization: Bearer your_api_key_goes_here" \ -F "file=@document.pdf" \ -F 'instructions={"labels":[{"label":"invoice","description":"A commercial invoice or bill."},{"label":"contract","description":"A legal agreement between parties."},{"label":"resume","description":"A résumé or CV from a job applicant."}]}'Response
Top label plus every candidate
{ "status": 200, "requestId": "req_cl_001", "output": { "classification": { "label": "invoice", "score": 0.92, "predictions": [ { "label": "invoice", "score": 0.92 }, { "label": "contract", "score": 0.14 }, { "label": "resume", "score": 0.03 } ] } }, "metrics": { "processingTimeMs": 1840, "pagesProcessed": 1 }, "usage": { "data_extraction_credits": { "cost": 1, "remainingCredits": 4999 } }}USE CASES
STUDIO
Open the Classify workbench to run a document against your own labels before wiring the endpoint into a pipeline. Save a label list as a classifier, call it by ID instead of resending the labels, and optionally pin a published version.
PRICING
Classification is priced per page, independent of parse mode: a 10-page document costs 10 credits. The free plan includes 5,000 Data Extraction API credits every month, no credit card required.
It scores a document against a list of labels you supply and returns a ranked list of predictions. Teams use it to decide where a document goes before extracting anything from it, so an intake queue can route each file to the right destination.
No. Classification is zero-shot: the API scores the document against the labels in your request, not labels learned from a training set. There is no model to train and no template to maintain, and a new set of document types only needs a new label list.
No. Dedicated scoring models do the work, not a generative large language model or vision language model. Each document is scored from its extracted text and from its page images, and the two scores are merged into a single ranked list.
Each score is an independent confidence for that label, from 0 to 1. The scores are not a probability distribution and do not sum to 1, so a cover letter attached to a contract can score high on both labels. Compare the top score with the runner-up and send close calls to manual review; the threshold is yours to choose.
PDF, PNG, JPEG, and TIFF. Office documents, which the parse and extract endpoints accept, are not listed for classify.
A flat 1 credit per page, independent of parse mode. The free plan includes 5,000 Data Extraction API credits every month with no credit card required.
Yes. Save a label list as a classifier in Data Extraction Studio and send its ID instead of the labels. You can pin a published version, and set storeRun to true when you want a run kept in your processing history.
Route it, then pull the fields you need with the extract endpoint of the same API.
Yes. The API is backed by Nutrient’s broader security practices, including SOC 2 Type 2 audited infrastructure and TLS-encrypted transport — built for use in business-critical and regulated workflows.
Developer resources