Skip to main content
Edit fills PDF forms and modifies DOCX documents using natural language instructions. You describe what values should go where, and Reducto handles field detection, mapping, and insertion. Edit completes the document lifecycle. Where Parse reads documents and Extract pulls data out, Edit writes data back in. This enables end-to-end workflows: classify an incoming document, extract data from it, and populate a different form or template, all within a single pipeline.
The Edit endpoint is available in the Python SDK, Node.js SDK, and via cURL. The Go SDK does not yet support Edit.

When to Use Edit

Edit solves form filling at scale. Instead of manually clicking through fillable PDFs or templating Word documents, you describe what you want in natural language. Common use cases:
  • Filling government and tax forms (W-9, I-9, G-1145) with applicant data
  • Completing insurance applications and claim forms
  • Populating legal contracts with client information
  • Generating customized DOCX reports from extracted data
PDF libraries like PyPDF require knowing exact field names and coordinates. Edit uses AI to understand field context, so “Fill in the applicant name” works even if the PDF field is named topmostSubform[0].Page1[0].f1_1[0].

Quick Start

What happens:
  1. Edit detects all fillable fields in the PDF (text boxes, checkboxes, dropdowns)
  2. An LLM reads your instructions and field context (labels, surrounding text)
  3. Each field gets mapped to the appropriate value
  4. The filled PDF is returned as a downloadable URL

PDF vs DOCX

PDF

PDFs have structured form widgets (text fields, checkboxes, dropdowns). For PDFs without existing form fields, Edit uses vision to detect where fillable areas should be.

DOCX

DOCX supports richer editing because the format allows inline content modification.

Request Parameters

document_url

The document to edit. Accepts the same formats as Parse: reducto:// file IDs from upload, public URLs, or presigned S3/GCS URLs.

edit_instructions

Natural language instructions describing what to fill. Be explicit about values and which fields they belong to:
Vague instructions like “Fill out John’s information” perform poorly. Include formatting hints when the form expects specific formats (dates, phone numbers, SSNs).

edit_options

form_schema

For repeatable form filling, define field locations explicitly. This skips detection, improving speed 3x and consistency. See Form Schema.

Response


Async Processing

For larger documents or webhook delivery, use the async endpoint:
Sync requests get priority by default. Async can request priority with priority=True if your account has budget available.

How It Works

PDF

  1. Detect form widgets (or use vision if none exist)
  2. Analyze context around each field (labels, headers)
  3. Map your instructions to fields based on descriptions
  4. Fill values into the PDF
With a form_schema, steps 1-2 are skipped since you’ve defined field locations and descriptions.

DOCX

  1. Tag editable locations (paragraphs, table cells, form controls)
  2. Analyze document structure against your instructions
  3. Generate specific edits (insert text, check boxes, update cells)
  4. Apply edits with optional highlighting

Troubleshooting

Several things can cause unfilled fields:
  • Instructions didn’t match: The LLM couldn’t map your instructions to that field. Use terms that appear on the form itself.
  • Dropdown mismatch: Value must exactly match an option (“CA” vs “California”)
  • Detection missed it: Use form_schema to explicitly define field locations
The PDF has no widgets and vision couldn’t detect fillable areas. Common causes:
  • Scanned image without clear form structure
  • Fields blend into background or lack clear boundaries
  • Document isn’t actually a fillable form
Solution: Provide a form_schema defining field locations. See Form Schema.
PDF fields have fixed sizes. When content exceeds capacity, it gets truncated.Solutions:
  1. Enable overflow: edit_options={"enable_overflow_pages": True} creates appendix pages
  2. Abbreviate in your instructions if the form expects short values
Be explicit: Check "Yes" for US Citizen works better than US Citizen: Yes. The LLM needs to understand you mean check a box, not fill text.
When fields have similar labels, the LLM may map incorrectly:
  1. Be more specific: “Applicant First Name: John” rather than “Name: John”
  2. Use form_schema: Define exactly which field is which using coordinates
  3. Reference position: “The name field in the top-left of page 1”
No. Parse finds existing content (labels like “Name:”). Edit finds empty fillable areas (the input box next to “Name:”). Form fields are blank rectangles with nothing for Parse to detect.Use Edit once without form_schema to detect fields, then save and reuse the returned schema.

Limitations

Partial Success

Edit returns successfully even when some fields couldn’t be filled. These situations don’t raise errors:

Format-Specific

PDF:
  • Signature and image fields not supported
  • Radio buttons have limited support
  • Heavily designed forms may detect incorrectly
DOCX:
  • Requires structured documents (form controls, tables)
  • Very large documents (100+ pages) take longer

Next Steps

Form Schema

Pre-define field locations for faster, more consistent filling.

API Reference

Complete endpoint specification.