ai.vision: Inspect rendered page images with a vision model and return structured JSON matching a schema. The visual counterpart to Extract Data: use it for conclusions that live in the pixels rather than the text (is the document signed? are the photos usable?). Renders PDF, image, or Office/Word inputs; route to specific pages with an ai.split page range to keep it cheap.
Configuration
Configuration goes inside the step’swith: block.
string
required
Template expression resolving to the input file (PDF, image, or Office document).
integer | string
First page to inspect (0-based, inclusive). Optional. Accepts a template expression. When omitted, starts from the first page.
integer | string
Last page to inspect (0-based, inclusive). Optional. Accepts a template expression. When omitted, runs to the last page. When BOTH pageFrom and pageTo are omitted, the whole document is inspected in chunks of maxPages (divide-and-conquer, results merged).
array<integer> | string
Explicit list of 0-based page indices to inspect, supports NON-contiguous selections, e.g. [4, 11, 19], or a template resolving to a number[] such as ”{{ steps.label_pages.output.byLabel.photo }}”. Highest priority: when set, pageFrom/pageTo and pages are ignored.
object
required
JSON Schema defining the structure the vision model should return.
string
Optional instruction refining the extraction. The schema drives it when omitted.
string
Provider ID (must support vision).
string
Model override (must support vision).
number
PDF render scale (1.0 = 72 DPI). Raise for small text or weak VLM OCR. Capped at 6 to avoid oversized page rasters.
integer
JPEG quality for rendered pages (default 85).
integer
Chunk size: the maximum pages sent to the vision model in a single call. When the inspected range (or the whole document) is larger, it is split into chunks of this size and the per-chunk results are merged by a reduce pass. The reduce follows each field’s DESCRIPTION: a boolean described as “present on any page” is OR-ed, one described as “true for every page” is AND-ed, and list fields are concatenated. The merge is most reliable for boolean/scalar claims; for schemas that AGGREGATE long lists across chunks it can still drop or reorder items, so prefer a bounded page range for large list extraction. Default 20, capped at 100.
Output
Returnsrecord<string, unknown>. Structured data matching the provided schema. The output also carries a reserved _vision key recording the inspected source document ref and the page indices that were rendered, so the UI can re-rasterize exactly those pages client-side. _vision is excluded from user-schema validation.