Skip to content
Log in

Classify Async

Async classify endpoint.

Persists a pollable job row, then runs the same classify CPU-worker pipeline without awaiting the result. Clients poll GET /job/{job_id}.

POSThttps://platform.reducto.ai/classify_async

Body

  • modelstring

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

    Default
    "default"
    Allowed
    defaultaccurate
  • priorityboolean

    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.

    Default
    true
  • asyncconfig__v3__AsyncConfig

    The configuration options for asynchronous processing. Used by /classify_async.

    3 properties
    • metadataunknown

      JSON metadata included in webhook request body. Defaults to None.

    • priorityboolean

      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.

      Default
      false
    • webhookSvixWebhookConfig | DirectWebhookConfig

      The 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_resultboolean

    Force the endpoint result to be returned in URL form.

    Default
    false
  • inputstring | string[] | UploadResponseRequired

    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
    UploadResponse properties
    • file_idstringRequired
    • presigned_urlstring
  • classification_schemaClassificationCategory[]

    A list of classification categories and their matching criteria.

    2 properties
    • categorystringRequired

      The category name/label that documents will be classified into (e.g., 'invoice', 'contract', 'receipt').

    • criteriastring[]Required

      A 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_groupsobject

    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(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
    • startnumber

      The page number to start processing from (1-indexed).

    • endnumber

      The page number to stop processing at (1-indexed).

    • startnumber

      The page number to start processing from (1-indexed).

    • endnumber

      The page number to stop processing at (1-indexed).

  • document_metadatastring

    Optional document-level metadata to include in classification prompts.

Response

  • job_idstringRequired
  • detailValidationError[]
    5 properties
    • loc(string | number)[]Required
    • msgstringRequired
    • typestringRequired
    • inputunknown
    • ctxobject

Type to search…

escClose