Class BatchConvertDocumentRequest

java.lang.Object
ai.docling.serve.api.request.DocumentRequest
ai.docling.serve.api.convert.request.BatchConvertDocumentRequest

public final class BatchConvertDocumentRequest extends DocumentRequest
Represents a request to batch convert document sources. The batch endpoint processes multiple documents asynchronously and returns a task ID for tracking progress. Sources can be HTTP URLs or S3 buckets, and results are delivered to a presigned URL or S3 target.

Unlike ConvertDocumentRequest, the target is required for batch requests — it must be either a PresignedUrlTarget or S3Target.

This class is serialized into JSON to conform to the API specification using JsonProperty annotations. Fields with null values or empty collections are omitted from the serialized JSON using JsonInclude.

  • Constructor Details

  • Method Details

    • getTarget

      public Target getTarget()
      Returns the output target, which is required for batch requests.
      Overrides:
      getTarget in class DocumentRequest
      Returns:
      the output target, never null
    • builder

      public static @NonNull BatchConvertDocumentRequest.Builder<?,?> builder()
    • toBuilder

      public @NonNull BatchConvertDocumentRequest.Builder<?,?> toBuilder()
    • getOptions

      @NonNull public @NonNull ConvertDocumentOptions getOptions()
      Options controlling the document conversion process. Includes settings for OCR, output formats, processing pipelines, and more.
      Returns:
      the conversion options
    • getCallbacks

      public List<CallbackSpec> getCallbacks()
      Webhook callbacks for receiving progress notifications during batch processing.
      Returns:
      the list of callback specifications
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class DocumentRequest