Class ConvertDocumentRequest

java.lang.Object
ai.docling.serve.api.convert.request.ConvertDocumentRequest

public class ConvertDocumentRequest extends Object
Represents a request to convert a document. The request includes the source(s) of the document, options for the conversion process, and the target specification for the converted output.

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.

  • Method Details

    • builder

      public static @NonNull ConvertDocumentRequest.Builder builder()
    • toBuilder

      public @NonNull ConvertDocumentRequest.Builder toBuilder()
    • getSources

      public List<Source> getSources()
      List of document sources to be converted. Each source can be a file (base64-encoded) or an HTTP URL.
      Returns:
      the list of document sources
    • 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
    • getTarget

      public @Nullable Target getTarget()
      Target specification for where the converted document should be delivered. If not specified, the result is returned in the response body.
      Returns:
      the output target, or null if not specified
    • toString

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