Skip to main content
The reviewer’s form is generated from your response_schema automatically. The shape you pass determines what they type into. This page lists every shape that renders well, and what falls back to a JSON textarea.

Primitives

Map cleanly to form fields.

Optional fields

Optional[X] flattens to the underlying type. The form field is unrequired but renders as the inner kind, not as a generic JSON textarea.

Nested objects

Render as an indented section with the inner fields stacked vertically. Useful for grouping related data.

Lists of objects (the killer feature)

list[BaseModel] becomes a spreadsheet-style editable table on the reviewer’s dashboard. One column per property of the element model. The reviewer adds rows, edits cells inline, removes rows.
What the reviewer sees for line_items:
This is the right shape for invoices, receipts, claim line items, table rows from scanned forms, any data that’s intrinsically tabular.

Multi-page response patterns

Three common ways to structure a response for a multi-page document. Pick the one that matches your downstream code; the SDK doesn’t enforce any particular pattern.

Pattern 1: Flat list across all pages (simplest)

The reviewer sees one spreadsheet table with all line items. Easy to consume downstream. Loses per-page provenance.

Pattern 2: Page-keyed structure

Renders as a repeatable_group (spreadsheet) where each row is itself a section (the per-page object). The reviewer adds one row per page and fills in the section per row. Useful when your downstream code reasons about pages explicitly.

Pattern 3: Top-level totals + nested table

Use when one customer call submits a batch of related documents.

Fields and constraints we recognize

What doesn’t render well (yet)

Some shapes fall back to a long_text JSON textarea. The reviewer can still submit (by typing JSON), but the UX isn’t ideal. v1 limitations:
  • Union[str, int] and similar multi-variant unions
  • Discriminated unions
  • Self-referential schemas (a model that references itself)
  • Schemas nested deeper than 6 levels
For these, restructure your schema (often flattening one level is enough) or open an issue describing your case. We add coverage based on real usage.

Examples

The smoke test we use in CI is a real reference for what works:
A reviewer takes ~30 seconds to verify a 5-line invoice with this shape.

Where to go next

The three flows

Combine schemas with Flow A (prior_extraction) for pre-filled forms.

Providers

Flow B: which provider you pick affects how the extraction maps to your schema.