Skip to main content
Form schemas let you define exactly where form fields are located in a PDF, what type they are, and how they should be filled. Instead of relying on Edit to detect fields each time, you provide the field definitions upfront. This matters for two reasons: speed and consistency. With a form schema, Edit skips field detection and description generation, processing forms significantly faster. And because the same fields are targeted every time, you get deterministic results across thousands of form fills.

The Workflow

  1. Run Edit once without a form_schema to let Reducto detect all fields
  2. Save the returned form_schema from the response
  3. Use that schema for subsequent fills of the same form type
The first call runs field detection and generates descriptions. Subsequent calls with the schema skip those steps entirely.

Schema Structure

A form schema is an array of field definitions:

Field Properties

Bounding Box

Coordinates are normalized (0-1), measured from the top-left corner:
Page numbers are 1-indexed. The first page is page: 1.

Fill Control

The fill and value properties control how each field is handled: Use value for fields that should always contain the same thing (form version, tax year). Use fill: false for fields that should stay blank (signature boxes).

Widget Types

Text

Standard text input fields. The LLM extracts the relevant value from your instructions based on the field’s description.
Include format expectations in the description. “SSN in XXX-XX-XXXX format” produces better results than just “SSN” because the LLM knows how to format the output.

Checkbox

Boolean fields that get checked or unchecked. The LLM interprets your instructions to determine whether the box should be checked.
Checkbox bounding boxes should be small and roughly square. Make descriptions explicit about what checking means: “US Citizen - Yes” is clearer than “Citizenship” when there are Yes/No checkbox pairs. Selection fields with predefined options. The LLM suggests a value, and Edit selects the matching option from the PDF’s dropdown.
The value must exactly match an available option. If your instructions say “CA” but the dropdown only contains “California”, the field is skipped silently. Consider listing options in the description: “State (CA, NY, TX, …)” to help the LLM match correctly.

Barcode

Special fields for barcode data. These are typically detected automatically in forms that have barcode regions and filled with encoded data.

Troubleshooting

Coordinates are from the top-left (0,0), with Y increasing downward. If you measured from bottom-left, flip the Y values: correct_top = 1 - your_top - heightStart with a single field, verify it works, then add more incrementally.
Edit matches schema fields to existing widgets using bounding box overlap. If overlap is less than 50%, a new widget is created.Run Edit without a schema first to see actual widget positions, then adjust your coordinates to match.
  1. Ensure type is "checkbox", not "text"
  2. Bounding boxes should be small and square
  3. Be explicit in instructions: “Check the ‘Yes’ checkbox for US citizenship”
Check for:
  • fill: false on the field
  • Dropdown value not matching available options exactly
  • Instructions don’t mention data for this field
  • Unsupported widget types (signatures, images)