---
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.
    - `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.
  - `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.
  - `usage` ParseUsage
    - `num_pages` integer, required
    - `credits` number, nullable

## Other responses

- `422` — Validation Error

---

[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/dd2b7cdc8dac/schema)
