Extract turns documents into structured, machine-readable data you can trust and trace. Every run gives you the values your schema defined, plus per-field confidence scores and citations that point back to the exact spot on the page. This page explains every field in the response.
A completed extract run looks like this (truncated to a few fields for brevity). The extracted data lives in output.value; the per-field details live in output.metadata, keyed by the same field paths.
output has two halves that share the same field paths:
value — the data extracted from the document, conforming to the JSON Schema you defined in the config.metadata — per-field details: confidence scores, citations, and insights.The metadata object uses keys that mirror the structure of value with a path-like notation, so you can pinpoint the details for any field — including those nested in objects or arrays. If value.line_items[0].description exists, its metadata lives under the key "line_items[0].description" in metadata.
Each entry in metadata describes one field path:
Read your data straight off value, and look up the matching metadata entry by its path-like key.
A confidence score tells you how confident the model is in an extracted value, as a number between 0 and 1 (closer to 1 is more confident). Each metadata entry can carry two scores:
Each metadata entry holds the scores for its field, keyed by the field’s path:
For arrays, confidence is reported at every level — the array as a whole (line_items), each item (line_items[0]), and each property within an item (line_items[0].description):
logprobsConfidence is being phased out: extraction_light has never returned it, and extraction_performance version 4.6.0 and later return null. Prefer ocrConfidence and the Review Agent scoring system. See Extraction Performance versions.
For routing on confidence in Workflows, threshold and review patterns, and accuracy best practices, see Confidence Scores.
Citations give you a bounding-box reference and the source text for each extracted field, so you can highlight where a value came from. Enable them by setting citationsEnabled: true in the extraction config.
Generating robust citations uses an additional citation-focused model, which adds a moderate increase in latency.
Citations are returned inside each field’s metadata entry:
polygon points share the page’s coordinate space, with the origin at the top-left of the page: x increases to the right and y increases downward, both measured in points. Each citation reports the page’s own dimensions at page.width and page.height, so you can divide by them to express any position as a fraction of the page.
Reduce the polygon to its bounding extent and normalize against the page dimensions to produce a highlight in your viewer’s coordinate system. Here’s an example that produces a percentage-based highlight area for react-pdf-viewer or a similar library:
The insights array is a shared channel that explains the model’s decisions. It carries reasoning entries when reasoning insights are enabled, and the Review Agent can add notes when it is enabled.
Each insight has a type and a content string.