> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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}``.



## OpenAPI

````yaml openapi.json post /classify_async
openapi: 3.1.0
info:
  title: Reducto API
  version: v1.12.20-1-g53196a2a1ea2
servers:
  - url: https://platform.reducto.ai
security: []
paths:
  /classify_async:
    post:
      summary: Classify Async
      description: >-
        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}``.
      operationId: classify_async_classify_async_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClassifyConfig'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncClassifyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - SkippableHTTPBearer: []
components:
  schemas:
    ClassifyConfig:
      properties:
        model:
          type: string
          enum:
            - default
            - accurate
          title: Model
          description: >-
            The classification model to use. Set to "accurate" to run Deep
            Classify for higher accuracy on hard documents. Defaults to
            "default".
          default: default
        priority:
          type: boolean
          title: Priority
          description: >-
            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
        async:
          $ref: '#/components/schemas/config__v3__AsyncConfig'
          description: >-
            The configuration options for asynchronous processing. Used by
            /classify_async.
          default:
            priority: false
        force_url_result:
          type: boolean
          title: Force Url Result
          description: Force the endpoint result to be returned in URL form.
          default: false
        input:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - $ref: '#/components/schemas/UploadResponse'
          title: Input
          description: >-
            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
        classification_schema:
          items:
            $ref: '#/components/schemas/ClassificationCategory'
          type: array
          title: Classification Schema
          description: A list of classification categories and their matching criteria.
          default: []
        category_groups:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          title: Category Groups
          description: >-
            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:
          anyOf:
            - $ref: '#/components/schemas/PageRange'
            - items:
                $ref: '#/components/schemas/PageRange'
              type: array
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Page Range
          description: >-
            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:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Metadata
          description: >-
            Optional document-level metadata to include in classification
            prompts.
      type: object
      required:
        - input
      title: ClassifyConfig
    AsyncClassifyResponse:
      properties:
        job_id:
          type: string
          title: Job Id
      type: object
      required:
        - job_id
      title: AsyncClassifyResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    config__v3__AsyncConfig:
      properties:
        metadata:
          title: Metadata
          description: JSON metadata included in webhook request body. Defaults to None.
        priority:
          type: boolean
          title: Priority
          description: >-
            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
        webhook:
          anyOf:
            - $ref: '#/components/schemas/SvixWebhookConfig'
            - $ref: '#/components/schemas/DirectWebhookConfig'
            - type: 'null'
          title: Webhook
          description: The webhook configuration for the asynchronous processing.
      type: object
      title: AsyncConfig
    UploadResponse:
      properties:
        file_id:
          type: string
          title: File Id
        presigned_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Presigned Url
      type: object
      required:
        - file_id
      title: UploadResponse
    ClassificationCategory:
      properties:
        category:
          type: string
          title: Category
          description: >-
            The category name/label that documents will be classified into
            (e.g., 'invoice', 'contract', 'receipt').
        criteria:
          items:
            type: string
          type: array
          title: Criteria
          description: >-
            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']).
      type: object
      required:
        - category
        - criteria
      title: ClassificationCategory
      description: A single classification category with its matching criteria.
    PageRange:
      properties:
        start:
          anyOf:
            - type: integer
            - type: 'null'
          title: Start
          description: The page number to start processing from (1-indexed).
        end:
          anyOf:
            - type: integer
            - type: 'null'
          title: End
          description: The page number to stop processing at (1-indexed).
      type: object
      title: PageRange
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SvixWebhookConfig:
      properties:
        mode:
          type: string
          const: svix
          title: Mode
          default: svix
        channels:
          items:
            type: string
          type: array
          title: Channels
          description: >-
            A list of Svix channels the message will be delivered down, omit to
            send to all channels.
      type: object
      title: SvixWebhookConfig
    DirectWebhookConfig:
      properties:
        mode:
          type: string
          const: direct
          title: Mode
          default: direct
        url:
          type: string
          title: Url
      type: object
      required:
        - url
      title: DirectWebhookConfig
  securitySchemes:
    SkippableHTTPBearer:
      type: http
      scheme: bearer

````