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

# Edit Async

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

## 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: `false`  

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.

### `webhook`

Type: `WebhookConfigNew`  
Required: no  

#### `mode`

Type: `string`  
Required: no  
Allowed values: `disabled`, `svix`, `direct`  
Default: `disabled`  

The mode to use for webhook delivery. Defaults to 'disabled'. We recommend using 'svix' for production environments.

#### `url`

Type: `string`  
Required: no  

The URL to send the webhook to (if using direct webhoook).

#### `metadata`

Type: `unknown`  
Required: no  

JSON metadata included in webhook request body

#### `channels`

Type: `string[]`  
Required: no  

A list of Svix channels the message will be delivered down, omit to send to all channels.

##### string

Type: `string`  

## Execute with cURL

```bash
curl -X POST "https://platform.reducto.ai/edit_async" \
  -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
{
  "job_id": "job_id"
}
```

##### Schema

###### AsyncEditResponse

Type: `AsyncEditResponse`  

###### `job_id`

Type: `string`  
Required: yes  

### 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-async/)
- [cURL Markdown](https://docs.reducto.ai/api-reference/api/curl/sections/edit/operations/edit-async.md)
