Skip to main content
POST
Classify

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
input
required

The URL of the document to be classified. You can provide one of the following:

  1. A publicly available URL
  2. A presigned S3 URL
  3. A reducto:// prefixed URL obtained from the /upload endpoint after directly uploading a document
model
enum<string>
default:default

The classification model to use. Set to "accurate" to run Deep Classify for higher accuracy on hard documents. Defaults to "default".

Available options:
default,
accurate
priority
boolean
default:true

Workers 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.

force_url_result
boolean
default:false

Force the endpoint result to be returned in URL form.

classification_schema
ClassificationCategory · object[]

A list of classification categories and their matching criteria.

category_groups
Category Groups · object

A mapping of higher-level classify groups to the category labels that belong to each group. When provided, the response includes extra_metadata.grouping with the matched group name, or ungrouped if the selected category is not in any group.

page_range

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.

document_metadata
string | null

Optional document-level metadata to include in classification prompts.

Response

Successful Response

Response from classify job - returned when polling /job/{job_id}

job_id
string
required
result
ClassifyResponseCategory · object
required
response_type
string
default:classify
Allowed value: "classify"
response_confidence
ResponseConfidence · object | null

Overall confidence breakdown for classification response.

usage
ClassifyUsage · object | null
extra_metadata
Extra Metadata · object

Additional metadata for the classify response. Contains grouping when the request set category_groups. Omitted when empty.

duration
number | null

The duration of the classify request in seconds.