Skip to main content
POST
Python

Body

Input to V2GroundOperationWorkflow — the /v2/ground request body.

A pure, stateless join: each extraction_metadata leaf's ranges (char offsets into the markdown both artifacts were produced from) is overlapped against the grounding.range carried on every structure block, and the matching blocks are returned. Nothing is stored server-side, so block ids in the response resolve only against the structure tree supplied here — pairing an extraction with the parse result it actually came from is the caller's responsibility.

extraction_metadata
Extraction Metadata · object
required

The extraction_metadata object returned by POST /v2/extract (or the pipeline's extract step): a tree mirroring your extraction schema whose leaves are {value, ranges} objects, where ranges are {start, end} Unicode code point offsets into the parse markdown.

Example:
structure
Structure · object
required

The structure tree from the parse response the extraction was produced from. Every block in the tree carries its grounding ({page, range, box}) inline; block ids in the response resolve against this exact tree.

Response

v2-ground result

Result returned by V2GroundOperationWorkflow — the /v2/ground response body.

grounding MIRRORS the extraction_metadata tree: nested objects and arrays keep their shape, and each {value, ranges} leaf is replaced by the list of structure blocks its ranges overlap (the block-hit shape documented on the field). It is NOT a flat map — a nested schema field like issuer.name resolves to grounding["issuer"]["name"].

grounding
Grounding · object
required

A tree mirroring extraction_metadata: nested objects and arrays keep their shape, and each {value, ranges} leaf is replaced by the list of blocks its ranges overlap, in reading order. Each entry carries block_id and type identifying the matched structure block, parent_id naming the enclosing block for nested blocks (table cells), and the block's own grounding object ({page, range, box}) verbatim. When the block itself carries atomic_grounding, the entry also lists the overlapping subset as {index, page, range, box} objects, where index is the position in the block's own atomic_grounding array; [] means the block matched but no individual entry did, and the key is omitted for blocks that carry no atomic_grounding. A leaf is null when its ranges was null (a synthesised value, with no supporting passage to look up) and [] when valid ranges overlapped no block (which usually indicates a mismatched extraction/structure pair).

Example:
metadata
V2GroundMetadata · object
required

Request metadata (job_id, duration_ms, credit_usage).