> This page is optimized for agents. Use the linked Markdown pages and llms.txt indexes for related API content.

# Edit

- Product: Reducto API
- Section: Edit
- Snapshot: Current
- Method: `POST`
- Path: `/edit`

## Request body

Required: yes  
Content types: `application/json`  

### `document_url`

Type: `string | UploadResponse`  
Required: yes  

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

Type: `string`  

#### UploadResponse

Type: `UploadResponse`  

##### `file_id`

Type: `string`  
Required: yes  

##### `presigned_url`

Type: `string`  
Required: no  

###### string

Type: `string`  

###### unknown

Type: `unknown`  

### `edit_instructions`

Type: `string`  
Required: yes  

The instructions for the edit.

### `edit_options`

Type: `EditOptions`  
Required: no  

#### `color`

Type: `string`  
Required: no  
Default: `#FF0000`  

The color to use for edits, in hex format.

#### `font_size`

Type: `number`  
Required: no  

The font size (in points) to use for filled text fields. If not specified, font size is automatically calculated based on field dimensions.

##### number

Type: `number`  

##### unknown

Type: `unknown`  

#### `llm_provider_preference`

Type: `string`  
Required: no  

The LLM provider to use for edit processing. If not specified, defaults to 'google'

##### string

Type: `string`  
Allowed values: `openai`, `anthropic`, `google`  

##### unknown

Type: `unknown`  

#### `enable_overflow_pages`

Type: `boolean`  
Required: no  
Default: `false`  

If True, creates overflow pages for text that doesn't fit in form fields. Defaults to False.

#### `flatten`

Type: `boolean`  
Required: no  
Default: `false`  

If True, flattens form fields after filling, converting them to static content. Defaults to False.

### `form_schema`

Type: `EditWidget[]`  
Required: no  

Form schema for PDF forms. List of widgets with their types, descriptions, and bounding boxes. Only works for PDFs.

#### EditWidget[]

Type: `EditWidget[]`  

##### EditWidget

Type: `EditWidget`  

###### `bbox`

Type: `BoundingBox`  
Required: yes  

Bounding box coordinates of the widget

###### `left`

Type: `number`  
Required: yes  

###### `top`

Type: `number`  
Required: yes  

###### `width`

Type: `number`  
Required: yes  

###### `height`

Type: `number`  
Required: yes  

###### `page`

Type: `number`  
Required: yes  

The page number of the bounding box (1-indexed).

###### `original_page`

Type: `number`  
Required: no  

The page number in the original document of the bounding box (1-indexed).

###### `description`

Type: `string`  
Required: yes  

Description of the widget extracted from the document

###### `type`

Type: `string`  
Required: yes  
Allowed values: `text`, `checkbox`, `radio`, `dropdown`, `barcode`  

Type of the form widget

###### `fill`

Type: `boolean`  
Required: no  
Default: `true`  

If True (default), the system will attempt to fill this widget. If False, the widget will be created but intentionally left unfilled.

###### `value`

Type: `string`  
Required: no  

If provided, this value will be used directly instead of attempting to intelligently determine the field value.

###### string

Type: `string`  

###### unknown

Type: `unknown`  

###### `font_size`

Type: `number`  
Required: no  

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.

###### number

Type: `number`  

###### unknown

Type: `unknown`  

###### `filled`

Type: `boolean`  
Required: no  

Response only. True if Reducto wrote a value to this widget, False if it was left empty. Ignored in requests.

###### boolean

Type: `boolean`  

###### unknown

Type: `unknown`  

#### unknown

Type: `unknown`  

### `priority`

Type: `boolean`  
Required: no  
Default: `true`  

Workers poll the priority queue ahead of the standard queue, so priority jobs start sooner when there is queued work; sync jobs are prioritized above async jobs by default.

## Execute with cURL

```bash
curl -X POST "https://platform.reducto.ai/edit" \
  -H "Authorization: Bearer $REDUCTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"document_url":"<value>","edit_instructions":"<edit_instructions>"}'
```

## Responses

### Response `200`

Category: success  

Successful Response

#### `application/json`

##### Generated example

```json
{
  "document_url": "document_url",
  "response_type": "edit",
  "job_id": "job_id",
  "form_schema": [
    {
      "bbox": {
        "left": 0,
        "top": 0,
        "width": 0,
        "height": 0,
        "page": 0,
        "original_page": 0
      },
      "description": "description",
      "type": "text",
      "fill": true,
      "value": "value",
      "font_size": 1,
      "filled": true
    }
  ],
  "usage": {
    "num_pages": 0,
    "credits": 0,
    "credit_breakdown": {},
    "page_billing_breakdown": {},
    "non_empty_cell_count": 0,
    "usage_breakdown": {
      "parse_model": "R-1",
      "tier": "Default",
      "parse_pages": 0,
      "parse_native_pages": 0,
      "legacy_parse_credits": 0,
      "ocr_pages": 0,
      "charts": 0,
      "prompted_blocks": 0
    }
  },
  "warnings": [
    "warnings"
  ]
}
```

##### Schema

###### EditResponse

Type: `EditResponse`  

###### `response_type`

Type: `string`  
Required: no  
Default: `edit`  

###### `job_id`

Type: `string`  
Required: no  

The unique identifier for the edit job.

###### string

Type: `string`  

###### unknown

Type: `unknown`  

###### `document_url`

Type: `string`  
Required: yes  

Presigned URL to download the edited document.

###### `form_schema`

Type: `EditWidget[]`  
Required: no  

Form schema for PDF forms. List of widgets with their types, descriptions, and bounding boxes.

###### EditWidget[]

Type: `EditWidget[]`  

###### EditWidget

Type: `EditWidget`  

###### `bbox`

Type: `BoundingBox`  
Required: yes  

Bounding box coordinates of the widget

###### `left`

Type: `number`  
Required: yes  

###### `top`

Type: `number`  
Required: yes  

###### `width`

Type: `number`  
Required: yes  

###### `height`

Type: `number`  
Required: yes  

###### `page`

Type: `number`  
Required: yes  

The page number of the bounding box (1-indexed).

###### `original_page`

Type: `number`  
Required: no  

The page number in the original document of the bounding box (1-indexed).

###### `description`

Type: `string`  
Required: yes  

Description of the widget extracted from the document

###### `type`

Type: `string`  
Required: yes  
Allowed values: `text`, `checkbox`, `radio`, `dropdown`, `barcode`  

Type of the form widget

###### `fill`

Type: `boolean`  
Required: no  
Default: `true`  

If True (default), the system will attempt to fill this widget. If False, the widget will be created but intentionally left unfilled.

###### `value`

Type: `string`  
Required: no  

If provided, this value will be used directly instead of attempting to intelligently determine the field value.

###### string

Type: `string`  

###### unknown

Type: `unknown`  

###### `font_size`

Type: `number`  
Required: no  

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.

###### number

Type: `number`  

###### unknown

Type: `unknown`  

###### `filled`

Type: `boolean`  
Required: no  

Response only. True if Reducto wrote a value to this widget, False if it was left empty. Ignored in requests.

###### boolean

Type: `boolean`  

###### unknown

Type: `unknown`  

###### unknown

Type: `unknown`  

###### `usage`

Type: `ParseUsage`  
Required: no  

Usage information for the edit operation, including number of pages and credits charged.

###### ParseUsage

Type: `ParseUsage`  

###### `num_pages`

Type: `number`  
Required: yes  

###### `credits`

Type: `number`  
Required: no  

###### number

Type: `number`  

###### unknown

Type: `unknown`  

###### `credit_breakdown`

Type: `object`  
Required: no  

###### object

Type: `object`  

###### unknown

Type: `unknown`  

###### `page_billing_breakdown`

Type: `object`  
Required: no  

Per-page breakdown of features used. Maps 1-indexed page numbers (as strings) to the list of billing features applied on that page (e.g. 'page', 'complex', 'chart_agent').

###### object

Type: `object`  

###### unknown

Type: `unknown`  

###### `non_empty_cell_count`

Type: `number`  
Required: no  

Total non-empty cells across all sheets. Only set for spreadsheet inputs.

###### number

Type: `number`  

###### unknown

Type: `unknown`  

###### `usage_breakdown`

Type: `one of 4`  
Required: no  

Raw usage quantities. Only set for accounts on the new pricing model; credit fields are omitted for those accounts.

###### ParseUsageBreakdown

Type: `ParseUsageBreakdown`  

Raw parse quantities for accounts on the new (Q3 2026) pricing model.

``parse_model`` is "R-1" for the new parse model, "R-1 Mini" for a job
that bills as R1 Mini (its pages are in ``parse_pages``), and "Legacy" for
the legacy parse pipeline. A legacy-pipeline parse carries its cost in
``legacy_parse_credits``; add-on quantities (``ocr_pages``, ``charts``,
``prompted_blocks``) apply to the new parse model only.

###### `parse_model`

Type: `string`  
Required: yes  
Allowed values: `R-1`, `R-1 Mini`, `Legacy`  

###### `tier`

Type: `string`  
Required: yes  
Allowed values: `Default`, `Batch`  

###### `parse_pages`

Type: `number`  
Required: no  
Default: `0`  

###### `parse_native_pages`

Type: `number`  
Required: no  
Default: `0`  

###### `legacy_parse_credits`

Type: `number`  
Required: no  
Default: `0`  

###### `ocr_pages`

Type: `number`  
Required: no  
Default: `0`  

###### `charts`

Type: `number`  
Required: no  
Default: `0`  

###### `prompted_blocks`

Type: `number`  
Required: no  
Default: `0`  

###### SplitUsageBreakdown

Type: `SplitUsageBreakdown`  

Raw split quantities for accounts on the new pricing model.

The add-on quantities (``ocr_pages``, ``charts``, ``prompted_blocks``)
come from the parse bundled into the split job; its page cost is covered
by ``split_pages`` but its add-ons are billed separately.

###### `split_model`

Type: `string`  
Required: yes  
Allowed values: `Split`, `Deep Split`  

###### `split_pages`

Type: `number`  
Required: no  
Default: `0`  

###### `ocr_pages`

Type: `number`  
Required: no  
Default: `0`  

###### `charts`

Type: `number`  
Required: no  
Default: `0`  

###### `prompted_blocks`

Type: `number`  
Required: no  
Default: `0`  

###### EditUsageBreakdown

Type: `EditUsageBreakdown`  

Raw edit quantities for accounts on the new pricing model.

``edit_pages`` is the page count billed at the ``edit_model`` rate. A job
with both normal and prefilled pages reports ``edit_model="Normal"`` with
the prefilled pages in ``prefill_pages``, billed at the "Prefill" rate.

###### `edit_model`

Type: `string`  
Required: yes  
Allowed values: `Normal`, `Prefill`  

###### `edit_pages`

Type: `number`  
Required: no  
Default: `0`  

###### `prefill_pages`

Type: `number`  
Required: no  
Default: `0`  

###### unknown

Type: `unknown`  

###### unknown

Type: `unknown`  

###### `warnings`

Type: `string[]`  
Required: no  

Warnings about the edit, for example when no form fields were filled.

###### string[]

Type: `string[]`  

###### string

Type: `string`  

###### unknown

Type: `unknown`  

### Response `422`

Category: client-error  

Validation Error

#### `application/json`

##### Generated example

```json
{
  "detail": [
    {
      "loc": [
        "loc"
      ],
      "msg": "msg",
      "type": "type",
      "ctx": {}
    }
  ]
}
```

##### Schema

###### HTTPValidationError

Type: `HTTPValidationError`  

###### `detail`

Type: `ValidationError[]`  
Required: no  

###### ValidationError

Type: `ValidationError`  

###### `loc`

Type: `string | number[]`  
Required: yes  

###### string | number

Type: `string | number`  

###### string

Type: `string`  

###### number

Type: `number`  

###### `msg`

Type: `string`  
Required: yes  

###### `type`

Type: `string`  
Required: yes  

###### `input`

Type: `unknown`  
Required: no  

###### `ctx`

Type: `object`  
Required: no  

## Related representations

- [Human documentation](/api-reference/api/sections/edit/operations/edit/)
- [cURL Markdown](https://docs.reducto.ai/api-reference/api/curl/sections/edit/operations/edit.md)
