Classify Document
Creates a Classify job. Classify gives one decision for a whole document: it labels the document with one of the categories you define, or suggests a document type when you supply none. For a decision per document in a bundle, use Split with categories.
Input: send file (PDF, PNG, JPEG or TIFF; repeat the field for up to 10 documents) or upload_ids, plus a JSON request. The request must contain a config object, so send {"config": {}} to use the defaults. You can also send a JSON body with input set to {"document_ref": "..."} to classify a child document returned by Split.
Processing: the job runs asynchronously. Poll GET /doc-ai/v1/job/{job_id}/status until it is completed, then fetch GET /doc-ai/v1/job/{job_id}/results. Add ?include=details to the results for inspected pages and provenance. To get the evidence behind the decision, send output.include_evidence as true in the request.
Review: review_required tells you whether a person should check the answer. confidence can be null; it is a token-based score, not a measured probability.
Authentication
Headers
Retry the same submission without creating another job. The same key with the same request returns the original job (idempotency_replayed: true); the same key with a changed request returns 409 IDEMPOTENCY_CONFLICT.
Request
Document file(s): PDF, PNG, JPEG or TIFF. Repeat the part for up to 10 documents with the same config.
Comma-separated upload IDs returned by POST /doc-ai/v1/job/upload, with or instead of file.
Response
Job created, with status accepted and the status_url and results_url to use next. When you send several files, the response is a parent job with one child job per file in documents.
Initial status, accepted.
Path to fetch results from once the job is completed.
true when the response replays an earlier request with the same Idempotency-Key.
Limits applied to the job, such as deadline_at and max_model_calls.
Batch submissions only: one entry per document, each with its own job.