https://platform.reducto.ai/classifyBody
modelstringThe classification model to use. Set to "accurate" to run Deep Classify for higher accuracy on hard documents. Defaults to "default".
- Default
"default"- Allowed
defaultaccurate
prioritybooleanWorkers poll the priority queue ahead of the standard queue, so priority jobs start sooner when there is queued work; sync jobs are prioritized above async jobs by default.
- Default
true
asyncconfig__v3__AsyncConfigThe configuration options for asynchronous processing. Used by /classify_async.
3 properties
metadataunknownJSON metadata included in webhook request body. Defaults to None.
prioritybooleanWorkers poll the priority queue ahead of the standard queue, so priority jobs start sooner when there is queued work; sync jobs are prioritized above async jobs by default.
- Default
false
webhookSvixWebhookConfig | DirectWebhookConfigThe webhook configuration for the asynchronous processing.
2 variants
modestring- Default
"svix"
channelsstring[]A list of Svix channels the message will be delivered down, omit to send to all channels.
modestring- Default
"direct"
urlstringRequired
force_url_resultbooleanForce the endpoint result to be returned in URL form.
- Default
false
inputstring | string[] | UploadResponseRequiredThe URL of the document to be classified. You can provide one of the following:
- A publicly available URL
- A presigned S3 URL
- A reducto:// prefixed URL obtained from the /upload endpoint after directly uploading a document
UploadResponse properties
file_idstringRequiredpresigned_urlstring
classification_schemaClassificationCategory[]A list of classification categories and their matching criteria.
2 properties
categorystringRequiredThe category name/label that documents will be classified into (e.g., 'invoice', 'contract', 'receipt').
criteriastring[]RequiredA list of criteria, keywords, or descriptions that define what characteristics a document must have to be classified into this category (e.g., ['contains billing information', 'has itemized charges']).
category_groupsobjectA mapping of higher-level classify groups to the category labels that belong to each group. When provided, the response includes
extra_metadata.groupingwith the matched group name, orungroupedif the selected category is not in any group.page_range(PageRange | PageRange[] | number)[]The page range to process (1-indexed). By default, the first 5 pages are used. At most 10 pages can be selected. Only applies to PDFs; ignored for other document types.
2 variants
startnumberThe page number to start processing from (1-indexed).
endnumberThe page number to stop processing at (1-indexed).
startnumberThe page number to start processing from (1-indexed).
endnumberThe page number to stop processing at (1-indexed).
document_metadatastringOptional document-level metadata to include in classification prompts.
Response
response_typestring- Default
"classify"
job_idstringRequiredresultClassifyResponseCategory | UrlResultRequired2 variants
categorystringRequired
typestringRequiredtype = 'url'
urlstringRequiredresult_idstringRequired
response_confidenceResponseConfidenceResponseConfidence properties
categoriesCategoryConfidence[]Required3 properties
categorystringRequiredconfidencenumberRequiredcriteria_confidenceCriteriaConfidence[]Required
usageClassifyUsageClassifyUsage properties
num_pagesnumberRequirednum_categoriesnumberRequiredcreditsnumberusage_breakdownClassifyUsageBreakdownRaw usage quantities. Only set for accounts on the new pricing model; credit fields are omitted for those accounts.
ClassifyUsageBreakdown properties
classify_modelstringRequired- Allowed
ClassifyDeep Classify
classify_pagesnumber- Default
0
extra_metadataobjectAdditional metadata for the classify response. Contains
groupingwhen the request setcategory_groups. Omitted when empty.durationnumberThe duration of the classify request in seconds.
detailValidationError[]5 properties
loc(string | number)[]RequiredmsgstringRequiredtypestringRequiredinputunknownctxobject