parse() or compare() call produces a ParseResult whose normalized data lives exclusively under result.outputs. You tell FileRouter exactly which outputs you want by passing an outputs array in your options — you are never charged for, or forced to receive, outputs you did not ask for. Top-level result fields like pageCount, usage, warnings, and timing remain at the root of the result regardless of which outputs you request.
Requesting outputs
Pass an array of output IDs tooutputs in your parse options. You must request at least one:
request-outputs.ts
Available output IDs
The valid output identifiers are exported from the SDK asparseOutputIds:
output-ids.ts
chunks
chunks
The document split into semantic chunks suitable for embedding and retrieval. Each chunk carries enough context to be inserted into a vector store. Currently supported by Datalab only.
html
html
The document rendered as an HTML string. Preserves headings, lists, and basic table markup. Currently supported by Datalab only.
images
images
An array of
ParsedImage objects extracted from the document. Each image may include a URL, a base64 data string, a caption, a bbox (bounding box), and the pageNumber it appeared on. Supported by LlamaParse, Mistral OCR, and Datalab.json
json
The document as structured JSON. The exact shape is provider-native — LlamaParse returns its items representation; Mistral OCR and Datalab return their own JSON structures. Supported by LlamaParse, Mistral OCR, and Datalab.
markdown
markdown
The full document as a Markdown string. This is the most universally supported output — all three providers produce it. When
pages is also requested, per-page Markdown is available on each page object as well.metadata
metadata
Document-level metadata as a key-value map (
Record<string, unknown>). Supported by LlamaParse, Mistral OCR, and Datalab.pages
pages
An array of
ParsePage objects — one per document page. Each page object carries the pageNumber and any per-page fields that the provider produced (Markdown, text, HTML, images, tables, confidence, dimensions, and warnings). Supported by LlamaParse, Mistral OCR, and Datalab.tables
tables
An array of
ParsedTable objects extracted from the document. Each table may include a markdown representation, an html representation, raw rows, a format hint, and the pageNumber. Supported by LlamaParse, Mistral OCR, and Datalab.text
text
The full document as plain text, stripped of Markdown formatting. Supported by LlamaParse only.
Provider output support
You can inspect what a configured provider supports at runtime:check-capabilities.ts
Result shape reference
All normalized parse outputs live here, keyed by the output ID you requested. Fields are only present if you included the corresponding ID in your
outputs array.Full document Markdown.
Full document plain text (LlamaParse only).
Full document HTML (Datalab only).
Per-page content objects, sorted by page number.
All extracted images across the document.
All extracted tables across the document.
Provider-native structured JSON.
Document-level metadata.
Semantic chunks for retrieval (Datalab only).
Total number of pages detected in the document.
The ID of the provider that produced this result (e.g.
"llamaparse").Any warnings raised during parsing, including per-page issues. Each warning has a
code, a message, and an optional pageNumber.Parse timing data:
startedAt (ISO string), completedAt (ISO string), and durationMs (number).Provider-reported consumption:
pages, credits, and costUsd — each optional depending on what the provider reports.Provider-native quality score, if available. Includes a
score and an optional scale. Do not compare scores across different providers — each provider uses its own scale.Including the raw provider response
By default, FileRouter discards the original provider response after normalizing it. If you need to inspect the native response — for debugging, auditing, or accessing data that FileRouter does not yet normalize — passincludeRaw: true:
include-raw.ts