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

# Async Infer (Dataset)

> Run inference asynchronously using a dataset reference instead of a file upload.

Reference input data by `dataset_id` (latest ready version) or `dataset_version_id`. Returns a `job_id` immediately.

Poll `GET /jobs/{job_id}` until status is `succeeded`, then fetch results via `GET /jobs/{job_id}/results`.

See [Output Formats](/api-reference/inference#output-formats) for output columns by model type.


## OpenAPI

````yaml /openapi.json post /models/{model_id}/infer-batch
openapi: 3.1.0
info:
  title: Woodwide API
  description: API service for the Woodwide platform
  version: 0.1.0
servers:
  - url: https://api.woodwide.ai
    description: Production
security: []
paths:
  /models/{model_id}/infer-batch:
    post:
      tags:
        - Inference
      summary: Async Infer (Dataset)
      description: >-
        Run inference asynchronously using a dataset reference instead of a file
        upload.
      operationId: infer_batch_models__model_id__infer_batch_post
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Model Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferBatchRequest'
            example:
              dataset_id: a1b2c3d4-0000-0000-0000-000000000001
              output_type: json
      responses:
        '202':
          description: >-
            Successful Response Output format depends on the `output_type`
            parameter (json, csv, or parquet). See [Output
            Formats](/api-reference/inference#output-formats) for output columns
            by model type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferBatchResponse'
              example:
                job_id: c3d4e5f6-0000-0000-0000-000000000004
                status: queued
                model:
                  id: b2c3d4e5-0000-0000-0000-000000000001
                  version_id: b2c3d4e5-0000-0000-0000-000000000002
                  version_number: 1
        '401':
          description: Unauthorized -- API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Not authenticated
        '403':
          description: >-
            Forbidden -- your API key does not have permission for this
            resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Forbidden
        '404':
          description: Not Found -- the requested resource does not exist.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: >-
            Too Many Requests -- you have exceeded the rate limit. Heavy
            operations (training, inference, dataset uploads) are limited to 60
            requests per minute per API key. All other endpoints are limited to
            600 requests per minute per API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Rate limit exceeded. Retry after a short delay.
      security:
        - HTTPBearer: []
components:
  schemas:
    InferBatchRequest:
      properties:
        model_version_id:
          type: string
          format: uuid
          title: Model Version Id
          description: >-
            Pin a specific model version. If omitted, the latest ready version
            is used.
        dataset_version_id:
          type: string
          format: uuid
          title: Dataset Version Id
          description: Pin a specific dataset version for inference input.
        dataset_id:
          type: string
          format: uuid
          title: Dataset Id
          description: >-
            Dataset to run inference on (uses latest ready version). Provide
            this OR dataset_version_id.
        output_type:
          $ref: '#/components/schemas/OutputType'
          description: 'Output format: json, csv, or parquet.'
          default: parquet
        anomaly_format:
          $ref: '#/components/schemas/AnomalyFormat'
          description: >-
            Controls anomaly detection output shape. 'ids_only' returns a list
            of anomalous row indices. 'per_row' returns id, is_anomaly, and
            anomaly_score for every input row. Ignored for non-anomaly model
            types.
          default: ids_only
      type: object
      title: InferBatchRequest
      description: |-
        Request body for asynchronous dataset inference.

        Reference input data by ``dataset_id`` (resolves to the latest ready
        version) or ``dataset_version_id`` for reproducibility.  Optionally
        pin a ``model_version_id``.
    InferBatchResponse:
      properties:
        job_id:
          type: string
          format: uuid
          title: Job Id
        status:
          type: string
          title: Status
        model:
          $ref: '#/components/schemas/ModelVersionRef'
      type: object
      required:
        - job_id
        - status
        - model
      title: InferBatchResponse
      description: Async inference submission response.
      example:
        job_id: c3d4e5f6-0000-0000-0000-000000000004
        status: queued
        model:
          id: b2c3d4e5-0000-0000-0000-000000000001
          version_id: b2c3d4e5-0000-0000-0000-000000000002
          version_number: 1
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
      description: Returned when request parameters or body fail validation.
    OutputType:
      type: string
      enum:
        - json
        - csv
        - parquet
      title: OutputType
      description: Supported inference output formats.
    AnomalyFormat:
      type: string
      enum:
        - ids_only
        - per_row
      title: AnomalyFormat
      description: |-
        Controls anomaly detection output format.

        - ``ids_only`` (default): returns a compact list of anomalous row
          indices.
        - ``per_row``: returns a row for every input instance with
          ``is_anomaly`` (bool) and ``anomaly_score`` (float) columns.
    ModelVersionRef:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        version_id:
          type: string
          format: uuid
          title: Version Id
        version_number:
          type: integer
          title: Version Number
      type: object
      required:
        - id
        - version_id
        - version_number
      title: ModelVersionRef
      description: Model version reference.
    ValidationError:
      type: object
      required:
        - loc
        - msg
        - type
      properties:
        loc:
          type: array
          items:
            type: string
          title: Location
          description: Path to the field that caused the error.
        msg:
          type: string
          title: Message
          description: Human-readable error message.
        type:
          type: string
          title: Error Type
          description: Machine-readable error type identifier.
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````