---
title: "Edit"
method: POST
path: "/edit"
---

# Edit

`POST /edit`

## Request body

- EditConfig
  - `document_url` union, required — The URL of the document to be processed. You can provide one of the following: 1. A publicly available URL 2. A presigned S3 URL 3. A reducto:// prefixed URL obtained from the /upload endpoint after directly uploading a document
    - string
    - UploadResponse
      - `file_id` string, required
      - `presigned_url` string, nullable
  - `edit_instructions` string, required — The instructions for the edit.
  - `edit_options` EditOptions
    - `color` string — The color to use for edits, in hex format.
    - `font_size` number, nullable — The font size (in points) to use for filled text fields. If not specified, font size is automatically calculated based on field dimensions.
    - `llm_provider_preference` 'openai' | 'anthropic' | 'google', nullable — The LLM provider to use for edit processing. If not specified, defaults to 'google'
    - `enable_overflow_pages` boolean — If True, creates overflow pages for text that doesn't fit in form fields. Defaults to False.
    - `flatten` boolean — If True, flattens form fields after filling, converting them to static content. Defaults to False.
  - `form_schema` EditWidget[], nullable — Form schema for PDF forms. List of widgets with their types, descriptions, and bounding boxes. Only works for PDFs.
    - `bbox` BoundingBox, required
      - `left` number, required
      - `top` number, required
      - `width` number, required
      - `height` number, required
      - `page` integer, required — The page number of the bounding box (1-indexed).
      - `original_page` integer — The page number in the original document of the bounding box (1-indexed).
    - `description` string, required — Description of the widget extracted from the document
    - `type` 'text' | 'checkbox' | 'radio' | 'dropdown' | 'barcode', required — Type of the form widget
    - `fill` boolean — If True (default), the system will attempt to fill this widget. If False, the widget will be created but intentionally left unfilled.
    - `value` string, nullable — If provided, this value will be used directly instead of attempting to intelligently determine the field value.
    - `font_size` number, nullable — Font size in points for this specific field. Takes priority over the global font_size in EditOptions. If not set, falls back to the global font_size, then to auto-calculated sizing.
  - `priority` boolean — If True, attempts to process the job with priority if the user has priority processing budget available; by default, sync jobs are prioritized above async jobs.

## Response `200`

Successful Response

- EditResponse
  - `document_url` string, required — Presigned URL to download the edited document.
  - `form_schema` EditWidget[], nullable — Form schema for PDF forms. List of widgets with their types, descriptions, and bounding boxes.
    - `bbox` BoundingBox, required
      - `left` number, required
      - `top` number, required
      - `width` number, required
      - `height` number, required
      - `page` integer, required — The page number of the bounding box (1-indexed).
      - `original_page` integer — The page number in the original document of the bounding box (1-indexed).
    - `description` string, required — Description of the widget extracted from the document
    - `type` 'text' | 'checkbox' | 'radio' | 'dropdown' | 'barcode', required — Type of the form widget
    - `fill` boolean — If True (default), the system will attempt to fill this widget. If False, the widget will be created but intentionally left unfilled.
    - `value` string, nullable — If provided, this value will be used directly instead of attempting to intelligently determine the field value.
    - `font_size` number, nullable — Font size in points for this specific field. Takes priority over the global font_size in EditOptions. If not set, falls back to the global font_size, then to auto-calculated sizing.
  - `usage` ParseUsage
    - `num_pages` integer, required
    - `credits` number, nullable
    - `credit_breakdown` object, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-20** `1cdad79931d9` — 2 info
  - added the new optional request property `form_schema/anyOf[subschema #1]/items/font_size`
  - added the optional property `form_schema/anyOf[subschema #1]/items/font_size` to the response with the `200` status
- **2026-03-20** `f8daaa99696f` — 1 info
  - added the optional property `usage/anyOf[subschema #1: ParseUsage]/credit_breakdown` to the response with the `200` status
- **2026-03-12** `c9c84d4212cb` — 1 info
  - added the new optional request property `edit_options/font_size`

[Change history](https://skmtc.dev/reductoai/apis/reducto-api/changes/edit/post.md)

---

[API](https://skmtc.dev/reductoai/apis/reducto-api.md) · [All operations](https://skmtc.dev/reductoai/apis/reducto-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/reductoai/reducto-api/revisions/9dcbb133ea8d/schema)
