OutputResponse
The OutputResponse object contains the processed results of a document analysis task.Chunk[]
required
Collection of document chunks, where each chunk contains one or more segments. See Chunk below.
string
The name of the file.
integer
The number of pages in the file.
string
The presigned URL of the PDF file.
object
deprecated
DEPRECATED: The extracted JSON from the document.
Chunk
A Chunk represents a logical grouping of segments from the document. Chunks are created based on thetarget_length configuration.
string
required
The unique identifier for the chunk.
integer
required
The total number of tokens in the chunk. Calculated by the configured
tokenizer.Segment[]
required
Collection of document segments that form this chunk.When
target_chunk_length > 0, contains the maximum number of segments that fit within that length (segments remain intact). Otherwise, contains exactly one segment.See Segment below.string
Suggested text to be embedded for the chunk. This text is generated by combining the embed content from each segment according to the configured embed sources (HTML, Markdown, LLM, or Content).Can be configured using
embed_sources in the SegmentProcessing configuration.Segment
A Segment represents a logical element within a document page (e.g., title, paragraph, table, image).string
required
Unique identifier for the segment.
SegmentType
required
The type of the segment. See Segment Types for all possible values.
BoundingBox
required
Bounding box coordinates for the segment.
integer
required
Page number of the segment (1-indexed).
number
required
Width of the page containing the segment.
number
required
Height of the page containing the segment.
string
required
Content of the segment, will be either HTML or Markdown, depending on the format chosen in segment processing configuration.
string
required
HTML representation of the segment.
string
required
Markdown representation of the segment.
string
required
Text content of the segment. Calculated from the OCR results.
string
LLM-generated representation of the segment. Only present if LLM processing is configured for this segment type.
string
Presigned URL to the cropped image of the segment. Only present if cropping is enabled for this segment type.
number
Confidence score of the layout analysis model for this segment (0.0 to 1.0).
OCRResult[]
OCR results for the segment.