> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Reducto API reference

> API reference for the Reducto plugin in Corsair: every `reducto.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Account

### configureWebhook

`account.configureWebhook`

Open the Svix webhook portal URL for this account

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.account.configureWebhook({});
```

**Input:** *empty object*

**Output:** `string`

***

### version

`account.version`

Read the Reducto API version

**Risk:** `read`

```ts theme={null}
await corsair.reducto.api.account.version({});
```

**Input:** *empty object*

**Output:** `string`

***

## Classify

### classify

`classify.classify`

Classify a document against a list of categories

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.classify.classify({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `input` | `string \| string[] \| object` | Yes | — |
| `classification_schema` | `object[]` | No | — |
| `category_groups` | `Record<string, any>` | No | — |
| `page_range` | `object \| object[] \| number[] \| null` | No | — |
| `document_metadata` | `string \| null` | No | — |
| `model` | `default \| accurate` | No | — |
| `priority` | `boolean` | No | — |
| `force_url_result` | `boolean` | No | — |

> [accordion] input full type
>
> ```ts theme={null}
> string | string[] | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] classification\_schema full type
>
> ```ts theme={null}
> {
>   category: string,
>   criteria: string[]
> }[]
> ```

> [accordion] page\_range full type
>
> ```ts theme={null}
> {
>   start?: number | null,
>   end?: number | null
> } | {
>   start?: number | null,
>   end?: number | null
> }[] | number[] | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |
| `result` | `object` | Yes | — |
| `duration` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   category: string
> } | {
>   type: url,
>   url: string,
>   result_id: string
> }
> ```

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   num_pages: number,
>   credits?: number | null,
>   num_categories: number
> } | null
> ```

***

### classifyAsync

`classify.classifyAsync`

Start a classify job and return its job id

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.classify.classifyAsync({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `input` | `string \| string[] \| object` | Yes | — |
| `classification_schema` | `object[]` | No | — |
| `category_groups` | `Record<string, any>` | No | — |
| `page_range` | `object \| object[] \| number[] \| null` | No | — |
| `document_metadata` | `string \| null` | No | — |
| `model` | `default \| accurate` | No | — |
| `priority` | `boolean` | No | — |
| `force_url_result` | `boolean` | No | — |
| `async` | `object` | No | — |

> [accordion] input full type
>
> ```ts theme={null}
> string | string[] | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] classification\_schema full type
>
> ```ts theme={null}
> {
>   category: string,
>   criteria: string[]
> }[]
> ```

> [accordion] page\_range full type
>
> ```ts theme={null}
> {
>   start?: number | null,
>   end?: number | null
> } | {
>   start?: number | null,
>   end?: number | null
> }[] | number[] | null
> ```

> [accordion] async full type
>
> ```ts theme={null}
> {
>   metadata?: Record<string, any> | null,
>   priority?: boolean,
>   webhook?: {
>     mode: direct,
>     url: string
>   } | {
>     mode: svix,
>     channels?: string[]
>   } | {
>     mode: disabled,
>     channels?: string[]
>   } | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |

***

## Edit

### edit

`edit.edit`

Fill or edit a PDF or DOCX from natural language instructions

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.edit.edit({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `document_url` | `string \| object` | Yes | — |
| `edit_instructions` | `string` | Yes | — |
| `edit_options` | `object` | No | — |
| `form_schema` | `any[] \| null` | No | — |
| `priority` | `boolean` | No | — |

> [accordion] document\_url full type
>
> ```ts theme={null}
> string | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] edit\_options full type
>
> ```ts theme={null}
> {
>   color?: string,
>   font_size?: number | null,
>   llm_provider_preference?: string | null,
>   enable_overflow_pages?: boolean,
>   flatten?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `document_url` | `string` | Yes | — |
| `job_id` | `string \| null` | No | — |
| `form_schema` | `any[] \| null` | No | — |
| `usage` | `object \| null` | No | — |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   num_pages: number,
>   credits?: number | null
> } | null
> ```

***

### editAsync

`edit.editAsync`

Start an edit job and return its job id

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.edit.editAsync({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `document_url` | `string \| object` | Yes | — |
| `edit_instructions` | `string` | Yes | — |
| `edit_options` | `object` | No | — |
| `form_schema` | `any[] \| null` | No | — |
| `priority` | `boolean` | No | — |
| `webhook` | `object` | No | — |

> [accordion] document\_url full type
>
> ```ts theme={null}
> string | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] edit\_options full type
>
> ```ts theme={null}
> {
>   color?: string,
>   font_size?: number | null,
>   llm_provider_preference?: string | null,
>   enable_overflow_pages?: boolean,
>   flatten?: boolean
> }
> ```

> [accordion] webhook full type
>
> ```ts theme={null}
> {
>   mode: direct,
>   url: string
> } | {
>   mode: svix,
>   channels?: string[]
> } | {
>   mode: disabled,
>   channels?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |

***

## Extract

### extract

`extract.extract`

Extract fields from a document using a JSON schema

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.extract.extract({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `input` | `string \| string[] \| object` | Yes | — |
| `parsing` | `object` | No | — |
| `instructions` | `object` | No | — |
| `settings` | `object` | No | — |

> [accordion] input full type
>
> ```ts theme={null}
> string | string[] | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] parsing full type
>
> ```ts theme={null}
> {
>   enhance?: {
>     agentic?: {
>       scope: text | table | figure,
>       prompt?: string | null,
>       mode?: default | auto | max,
>       advanced_chart_agent?: boolean,
>       return_overlays?: boolean
>     }[],
>     advanced_chart_agent?: boolean,
>     summarize_figures?: boolean,
>     intelligent_ordering?: boolean
>   },
>   retrieval?: {
>     chunking?: {
>       chunk_mode?: variable | section | page | disabled | block | page_sections,
>       chunk_size?: number | null,
>       chunk_overlap?: number
>     },
>     filter_blocks?: (Header | Footer | Title | Section Header | Page Number | List Item | Figure | Table | Key Value | Text | Comment | Signature)[],
>     embedding_optimized?: boolean
>   },
>   formatting?: {
>     add_page_markers?: boolean,
>     table_output_format?: html | json | md | jsonbbox | dynamic | csv,
>     merge_tables?: boolean,
>     include?: (change_tracking | highlight | comments | hyperlinks | signatures | ignore_watermarks)[]
>   },
>   spreadsheet?: {
>     split_large_tables?: {
>       enabled?: boolean,
>       size?: number
>     },
>     include?: (cell_colors | formula | dropdowns)[],
>     clustering?: accurate | fast | disabled,
>     exclude?: string[],
>     max_cell_count?: number | null
>   },
>   settings?: {
>     ocr_system?: standard | legacy,
>     extraction_mode?: ocr | hybrid,
>     force_url_result?: boolean,
>     force_file_extension?: string | null,
>     return_ocr_data?: boolean,
>     return_images?: (figure | table | page)[],
>     embed_pdf_metadata?: boolean,
>     extract_document_properties?: boolean,
>     embed_pdf_metadata_dpi?: number,
>     persist_results?: boolean,
>     timeout?: number | null,
>     page_range?: {
>       start?: number | null,
>       end?: number | null
>     } | {
>       start?: number | null,
>       end?: number | null
>     }[] | number[] | null,
>     document_password?: string | null,
>     model?: string | null
>   }
> }
> ```

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   schema?: any,
>   system_prompt?: string
> }
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   include_images?: boolean,
>   optimize_for_latency?: boolean,
>   force_url_result?: boolean,
>   array_extract?: boolean,
>   deep_extract?: boolean,
>   citations?: {
>     enabled?: boolean,
>     numerical_confidence?: boolean,
>     parent_block?: string
>   },
>   page_range?: {
>     start?: number | null,
>     end?: number | null
>   } | {
>     start?: number | null,
>     end?: number | null
>   }[] | number[] | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `usage` | `object` | Yes | — |
| `result` | `any[] \| Record<string, any> \| object` | Yes | — |
| `citations` | `any[] \| object \| null` | No | — |
| `job_id` | `string \| null` | No | — |
| `duration` | `number \| null` | No | — |
| `studio_link` | `string \| null` | No | — |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   num_pages: number,
>   credits?: number | null,
>   num_fields: number
> }
> ```

> [accordion] result full type
>
> ```ts theme={null}
> any[] | Record<string, any> | {
>   type: url,
>   url: string,
>   result_id: string
> }
> ```

> [accordion] citations full type
>
> ```ts theme={null}
> any[] | {
>   type: url,
>   url: string,
>   result_id: string
> } | null
> ```

***

### extractAsync

`extract.extractAsync`

Start an extract job and return its job id

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.extract.extractAsync({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `input` | `string \| string[] \| object` | Yes | — |
| `parsing` | `object` | No | — |
| `instructions` | `object` | No | — |
| `settings` | `object` | No | — |
| `async` | `object` | No | — |
| `queue_priority` | `auto \| standard \| batch` | No | — |

> [accordion] input full type
>
> ```ts theme={null}
> string | string[] | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] parsing full type
>
> ```ts theme={null}
> {
>   enhance?: {
>     agentic?: {
>       scope: text | table | figure,
>       prompt?: string | null,
>       mode?: default | auto | max,
>       advanced_chart_agent?: boolean,
>       return_overlays?: boolean
>     }[],
>     advanced_chart_agent?: boolean,
>     summarize_figures?: boolean,
>     intelligent_ordering?: boolean
>   },
>   retrieval?: {
>     chunking?: {
>       chunk_mode?: variable | section | page | disabled | block | page_sections,
>       chunk_size?: number | null,
>       chunk_overlap?: number
>     },
>     filter_blocks?: (Header | Footer | Title | Section Header | Page Number | List Item | Figure | Table | Key Value | Text | Comment | Signature)[],
>     embedding_optimized?: boolean
>   },
>   formatting?: {
>     add_page_markers?: boolean,
>     table_output_format?: html | json | md | jsonbbox | dynamic | csv,
>     merge_tables?: boolean,
>     include?: (change_tracking | highlight | comments | hyperlinks | signatures | ignore_watermarks)[]
>   },
>   spreadsheet?: {
>     split_large_tables?: {
>       enabled?: boolean,
>       size?: number
>     },
>     include?: (cell_colors | formula | dropdowns)[],
>     clustering?: accurate | fast | disabled,
>     exclude?: string[],
>     max_cell_count?: number | null
>   },
>   settings?: {
>     ocr_system?: standard | legacy,
>     extraction_mode?: ocr | hybrid,
>     force_url_result?: boolean,
>     force_file_extension?: string | null,
>     return_ocr_data?: boolean,
>     return_images?: (figure | table | page)[],
>     embed_pdf_metadata?: boolean,
>     extract_document_properties?: boolean,
>     embed_pdf_metadata_dpi?: number,
>     persist_results?: boolean,
>     timeout?: number | null,
>     page_range?: {
>       start?: number | null,
>       end?: number | null
>     } | {
>       start?: number | null,
>       end?: number | null
>     }[] | number[] | null,
>     document_password?: string | null,
>     model?: string | null
>   }
> }
> ```

> [accordion] instructions full type
>
> ```ts theme={null}
> {
>   schema?: any,
>   system_prompt?: string
> }
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   include_images?: boolean,
>   optimize_for_latency?: boolean,
>   force_url_result?: boolean,
>   array_extract?: boolean,
>   deep_extract?: boolean,
>   citations?: {
>     enabled?: boolean,
>     numerical_confidence?: boolean,
>     parent_block?: string
>   },
>   page_range?: {
>     start?: number | null,
>     end?: number | null
>   } | {
>     start?: number | null,
>     end?: number | null
>   }[] | number[] | null
> }
> ```

> [accordion] async full type
>
> ```ts theme={null}
> {
>   metadata?: Record<string, any> | null,
>   priority?: boolean,
>   webhook?: {
>     mode: direct,
>     url: string
>   } | {
>     mode: svix,
>     channels?: string[]
>   } | {
>     mode: disabled,
>     channels?: string[]
>   } | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |

***

## Files

### delete

`files.delete`

Delete an uploaded file. Free plans return 422 NOT\_APPLICABLE; Growth and Enterprise delete it

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.reducto.api.files.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `file_id` | `string` | Yes | — |

***

### upload

`files.upload`

Upload a file and return a reducto:// file id

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.files.upload({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file` | `string \| object \| custom` | Yes | — |
| `extension` | `string \| null` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `file_id` | `string` | Yes | — |
| `presigned_url` | `string \| null` | No | — |

***

## Jobs

### cancel

`jobs.cancel`

Cancel a running job

**Risk:** `destructive`

```ts theme={null}
await corsair.reducto.api.jobs.cancel({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |

**Output:** `Record<string, any> \| null \| undefined`

***

### delete

`jobs.delete`

Delete a job and its stored artifacts. Returns 202. Free plans return 422 NOT\_APPLICABLE

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.reducto.api.jobs.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |
| `include_persisted` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |

***

### get

`jobs.get`

Retrieve a job status and, when finished, its result

**Risk:** `read`

```ts theme={null}
await corsair.reducto.api.jobs.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | Yes | — |
| `result` | `any \| null` | No | — |
| `progress` | `number \| null` | No | — |
| `reason` | `string \| null` | No | — |
| `error` | `any \| null` | No | — |
| `type` | `string \| null` | No | — |
| `source` | `any \| null` | No | — |
| `num_pages` | `number \| null` | No | — |
| `total_pages` | `number \| null` | No | — |
| `duration` | `number \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `bucket` | `any \| null` | No | — |

***

### list

`jobs.list`

List jobs, page by page, using cursor and limit

**Risk:** `read`

```ts theme={null}
await corsair.reducto.api.jobs.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `exclude_configs` | `boolean` | No | — |
| `cursor` | `string \| null` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `jobs` | `object[]` | Yes | — |
| `next_cursor` | `string \| null` | No | — |

> [accordion] jobs full type
>
> ```ts theme={null}
> {
>   job_id: string,
>   status: string,
>   type: string,
>   raw_config?: string,
>   created_at: string,
>   source?: any | null,
>   num_pages?: number | null,
>   total_pages?: number | null,
>   duration?: number | null,
>   bucket?: any | null
> }[]
> ```

***

## Parse

### parse

`parse.parse`

Parse a document into chunks of text, tables, and figures with bounding boxes

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.parse.parse({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `input` | `string \| string[] \| object` | Yes | — |
| `enhance` | `object` | No | — |
| `retrieval` | `object` | No | — |
| `formatting` | `object` | No | — |
| `spreadsheet` | `object` | No | — |
| `settings` | `object` | No | — |

> [accordion] input full type
>
> ```ts theme={null}
> string | string[] | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] enhance full type
>
> ```ts theme={null}
> {
>   agentic?: {
>     scope: text | table | figure,
>     prompt?: string | null,
>     mode?: default | auto | max,
>     advanced_chart_agent?: boolean,
>     return_overlays?: boolean
>   }[],
>   advanced_chart_agent?: boolean,
>   summarize_figures?: boolean,
>   intelligent_ordering?: boolean
> }
> ```

> [accordion] retrieval full type
>
> ```ts theme={null}
> {
>   chunking?: {
>     chunk_mode?: variable | section | page | disabled | block | page_sections,
>     chunk_size?: number | null,
>     chunk_overlap?: number
>   },
>   filter_blocks?: (Header | Footer | Title | Section Header | Page Number | List Item | Figure | Table | Key Value | Text | Comment | Signature)[],
>   embedding_optimized?: boolean
> }
> ```

> [accordion] formatting full type
>
> ```ts theme={null}
> {
>   add_page_markers?: boolean,
>   table_output_format?: html | json | md | jsonbbox | dynamic | csv,
>   merge_tables?: boolean,
>   include?: (change_tracking | highlight | comments | hyperlinks | signatures | ignore_watermarks)[]
> }
> ```

> [accordion] spreadsheet full type
>
> ```ts theme={null}
> {
>   split_large_tables?: {
>     enabled?: boolean,
>     size?: number
>   },
>   include?: (cell_colors | formula | dropdowns)[],
>   clustering?: accurate | fast | disabled,
>   exclude?: string[],
>   max_cell_count?: number | null
> }
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   ocr_system?: standard | legacy,
>   extraction_mode?: ocr | hybrid,
>   force_url_result?: boolean,
>   force_file_extension?: string | null,
>   return_ocr_data?: boolean,
>   return_images?: (figure | table | page)[],
>   embed_pdf_metadata?: boolean,
>   extract_document_properties?: boolean,
>   embed_pdf_metadata_dpi?: number,
>   persist_results?: boolean,
>   timeout?: number | null,
>   page_range?: {
>     start?: number | null,
>     end?: number | null
>   } | {
>     start?: number | null,
>     end?: number | null
>   }[] | number[] | null,
>   document_password?: string | null,
>   model?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |
| `duration` | `number` | Yes | — |
| `usage` | `object` | Yes | — |
| `result` | `object` | Yes | — |
| `response_type` | `string \| null` | No | — |
| `pdf_url` | `string \| null` | No | — |
| `studio_link` | `string \| null` | No | — |
| `document_properties` | `object \| null` | No | — |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   num_pages: number,
>   credits?: number | null
> }
> ```

> [accordion] result full type
>
> ```ts theme={null}
> {
>   type: full,
>   chunks: {
>     content: string,
>     embed?: string,
>     blocks?: {
>       type: string,
>       content?: string,
>       bbox?: {
>         left: number,
>         top: number,
>         width: number,
>         height: number,
>         page: number,
>         original_page?: number
>       },
>       confidence?: string | null,
>       granular_confidence?: {
>         parse_confidence?: number | null,
>         extract_confidence?: number | null
>       } | null,
>       image_url?: string | null,
>       chart_data?: string[] | null,
>       merged_tables?: any[] | null,
>       extra?: Record<string, any> | null
>     }[],
>     enriched?: string | null,
>     enrichment_success?: boolean
>   }[],
>   ocr?: {
>     words?: {
>       text: string,
>       bbox: {
>         left: number,
>         top: number,
>         width: number,
>         height: number,
>         page: number,
>         original_page?: number
>       },
>       confidence?: number | null,
>       chunk_index?: number | null,
>       rotation?: number | null
>     }[],
>     lines?: {
>       text: string,
>       bbox: {
>         left: number,
>         top: number,
>         width: number,
>         height: number,
>         page: number,
>         original_page?: number
>       },
>       confidence?: number | null,
>       chunk_index?: number | null,
>       rotation?: number | null
>     }[]
>   } | null,
>   custom?: any | null
> } | {
>   type: url,
>   url: string,
>   result_id: string
> }
> ```

> [accordion] document\_properties full type
>
> ```ts theme={null}
> {
>   title?: string | null,
>   author?: string | null,
>   subject?: string | null,
>   keywords?: string | null,
>   creator?: string | null,
>   producer?: string | null,
>   last_modified_by?: string | null,
>   created_at?: string | null,
>   modified_at?: string | null
> } | null
> ```

***

### parseAsync

`parse.parseAsync`

Start a parse job and return its job id

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.parse.parseAsync({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `input` | `string \| string[] \| object` | Yes | — |
| `enhance` | `object` | No | — |
| `retrieval` | `object` | No | — |
| `formatting` | `object` | No | — |
| `spreadsheet` | `object` | No | — |
| `settings` | `object` | No | — |
| `async` | `object` | No | — |
| `queue_priority` | `auto \| standard \| batch` | No | — |

> [accordion] input full type
>
> ```ts theme={null}
> string | string[] | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] enhance full type
>
> ```ts theme={null}
> {
>   agentic?: {
>     scope: text | table | figure,
>     prompt?: string | null,
>     mode?: default | auto | max,
>     advanced_chart_agent?: boolean,
>     return_overlays?: boolean
>   }[],
>   advanced_chart_agent?: boolean,
>   summarize_figures?: boolean,
>   intelligent_ordering?: boolean
> }
> ```

> [accordion] retrieval full type
>
> ```ts theme={null}
> {
>   chunking?: {
>     chunk_mode?: variable | section | page | disabled | block | page_sections,
>     chunk_size?: number | null,
>     chunk_overlap?: number
>   },
>   filter_blocks?: (Header | Footer | Title | Section Header | Page Number | List Item | Figure | Table | Key Value | Text | Comment | Signature)[],
>   embedding_optimized?: boolean
> }
> ```

> [accordion] formatting full type
>
> ```ts theme={null}
> {
>   add_page_markers?: boolean,
>   table_output_format?: html | json | md | jsonbbox | dynamic | csv,
>   merge_tables?: boolean,
>   include?: (change_tracking | highlight | comments | hyperlinks | signatures | ignore_watermarks)[]
> }
> ```

> [accordion] spreadsheet full type
>
> ```ts theme={null}
> {
>   split_large_tables?: {
>     enabled?: boolean,
>     size?: number
>   },
>   include?: (cell_colors | formula | dropdowns)[],
>   clustering?: accurate | fast | disabled,
>   exclude?: string[],
>   max_cell_count?: number | null
> }
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   ocr_system?: standard | legacy,
>   extraction_mode?: ocr | hybrid,
>   force_url_result?: boolean,
>   force_file_extension?: string | null,
>   return_ocr_data?: boolean,
>   return_images?: (figure | table | page)[],
>   embed_pdf_metadata?: boolean,
>   extract_document_properties?: boolean,
>   embed_pdf_metadata_dpi?: number,
>   persist_results?: boolean,
>   timeout?: number | null,
>   page_range?: {
>     start?: number | null,
>     end?: number | null
>   } | {
>     start?: number | null,
>     end?: number | null
>   }[] | number[] | null,
>   document_password?: string | null,
>   model?: string | null
> }
> ```

> [accordion] async full type
>
> ```ts theme={null}
> {
>   metadata?: Record<string, any> | null,
>   priority?: boolean,
>   webhook?: {
>     mode: direct,
>     url: string
>   } | {
>     mode: svix,
>     channels?: string[]
>   } | {
>     mode: disabled,
>     channels?: string[]
>   } | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |

***

## Pipeline

### run

`pipeline.run`

Run a Studio pipeline against a document

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.pipeline.run({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `input` | `string \| string[] \| object` | Yes | — |
| `pipeline_id` | `string` | Yes | — |
| `settings` | `object` | No | — |

> [accordion] input full type
>
> ```ts theme={null}
> string | string[] | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   document_password?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |
| `usage` | `object` | Yes | — |
| `result` | `any` | Yes | — |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   num_pages: number,
>   credits?: number | null
> }
> ```

***

### runAsync

`pipeline.runAsync`

Start a Studio pipeline job and return its job id

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.pipeline.runAsync({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `input` | `string \| string[] \| object` | Yes | — |
| `pipeline_id` | `string` | Yes | — |
| `settings` | `object` | No | — |
| `async` | `object` | No | — |

> [accordion] input full type
>
> ```ts theme={null}
> string | string[] | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   document_password?: string | null
> }
> ```

> [accordion] async full type
>
> ```ts theme={null}
> {
>   metadata?: Record<string, any> | null,
>   priority?: boolean,
>   webhook?: {
>     mode: direct,
>     url: string
>   } | {
>     mode: svix,
>     channels?: string[]
>   } | {
>     mode: disabled,
>     channels?: string[]
>   } | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |

***

## Split

### split

`split.split`

Split a document into named sections by page

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.split.split({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `input` | `string \| string[] \| object` | Yes | — |
| `parsing` | `object` | No | — |
| `split_description` | `object[]` | Yes | — |
| `split_rules` | `string` | No | — |
| `settings` | `object` | No | — |

> [accordion] input full type
>
> ```ts theme={null}
> string | string[] | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] parsing full type
>
> ```ts theme={null}
> {
>   enhance?: {
>     agentic?: {
>       scope: text | table | figure,
>       prompt?: string | null,
>       mode?: default | auto | max,
>       advanced_chart_agent?: boolean,
>       return_overlays?: boolean
>     }[],
>     advanced_chart_agent?: boolean,
>     summarize_figures?: boolean,
>     intelligent_ordering?: boolean
>   },
>   retrieval?: {
>     chunking?: {
>       chunk_mode?: variable | section | page | disabled | block | page_sections,
>       chunk_size?: number | null,
>       chunk_overlap?: number
>     },
>     filter_blocks?: (Header | Footer | Title | Section Header | Page Number | List Item | Figure | Table | Key Value | Text | Comment | Signature)[],
>     embedding_optimized?: boolean
>   },
>   formatting?: {
>     add_page_markers?: boolean,
>     table_output_format?: html | json | md | jsonbbox | dynamic | csv,
>     merge_tables?: boolean,
>     include?: (change_tracking | highlight | comments | hyperlinks | signatures | ignore_watermarks)[]
>   },
>   spreadsheet?: {
>     split_large_tables?: {
>       enabled?: boolean,
>       size?: number
>     },
>     include?: (cell_colors | formula | dropdowns)[],
>     clustering?: accurate | fast | disabled,
>     exclude?: string[],
>     max_cell_count?: number | null
>   },
>   settings?: {
>     ocr_system?: standard | legacy,
>     extraction_mode?: ocr | hybrid,
>     force_url_result?: boolean,
>     force_file_extension?: string | null,
>     return_ocr_data?: boolean,
>     return_images?: (figure | table | page)[],
>     embed_pdf_metadata?: boolean,
>     extract_document_properties?: boolean,
>     embed_pdf_metadata_dpi?: number,
>     persist_results?: boolean,
>     timeout?: number | null,
>     page_range?: {
>       start?: number | null,
>       end?: number | null
>     } | {
>       start?: number | null,
>       end?: number | null
>     }[] | number[] | null,
>     document_password?: string | null,
>     model?: string | null
>   }
> }
> ```

> [accordion] split\_description full type
>
> ```ts theme={null}
> {
>   name: string,
>   description: string,
>   partition_key?: string | null
> }[]
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   table_cutoff?: truncate | preserve,
>   allow_page_overlap?: boolean,
>   auto_partition?: boolean,
>   deep_split?: boolean,
>   force_url_result?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `usage` | `object` | Yes | — |
| `result` | `object \| Record<string, any>` | Yes | — |
| `job_id` | `string \| null` | No | — |
| `duration` | `number \| null` | No | — |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   num_pages: number,
>   credits?: number | null
> }
> ```

> [accordion] result full type
>
> ```ts theme={null}
> {
>   splits: {
>     name: string,
>     pages: number[]
>   }[]
> } | {
>   type: url,
>   url: string,
>   result_id: string
> } | Record<string, any>
> ```

***

### splitAsync

`split.splitAsync`

Start a split job and return its job id

**Risk:** `write`

```ts theme={null}
await corsair.reducto.api.split.splitAsync({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `input` | `string \| string[] \| object` | Yes | — |
| `parsing` | `object` | No | — |
| `split_description` | `object[]` | Yes | — |
| `split_rules` | `string` | No | — |
| `settings` | `object` | No | — |
| `async` | `object` | No | — |

> [accordion] input full type
>
> ```ts theme={null}
> string | string[] | {
>   file_id: string,
>   presigned_url?: string | null
> }
> ```

> [accordion] parsing full type
>
> ```ts theme={null}
> {
>   enhance?: {
>     agentic?: {
>       scope: text | table | figure,
>       prompt?: string | null,
>       mode?: default | auto | max,
>       advanced_chart_agent?: boolean,
>       return_overlays?: boolean
>     }[],
>     advanced_chart_agent?: boolean,
>     summarize_figures?: boolean,
>     intelligent_ordering?: boolean
>   },
>   retrieval?: {
>     chunking?: {
>       chunk_mode?: variable | section | page | disabled | block | page_sections,
>       chunk_size?: number | null,
>       chunk_overlap?: number
>     },
>     filter_blocks?: (Header | Footer | Title | Section Header | Page Number | List Item | Figure | Table | Key Value | Text | Comment | Signature)[],
>     embedding_optimized?: boolean
>   },
>   formatting?: {
>     add_page_markers?: boolean,
>     table_output_format?: html | json | md | jsonbbox | dynamic | csv,
>     merge_tables?: boolean,
>     include?: (change_tracking | highlight | comments | hyperlinks | signatures | ignore_watermarks)[]
>   },
>   spreadsheet?: {
>     split_large_tables?: {
>       enabled?: boolean,
>       size?: number
>     },
>     include?: (cell_colors | formula | dropdowns)[],
>     clustering?: accurate | fast | disabled,
>     exclude?: string[],
>     max_cell_count?: number | null
>   },
>   settings?: {
>     ocr_system?: standard | legacy,
>     extraction_mode?: ocr | hybrid,
>     force_url_result?: boolean,
>     force_file_extension?: string | null,
>     return_ocr_data?: boolean,
>     return_images?: (figure | table | page)[],
>     embed_pdf_metadata?: boolean,
>     extract_document_properties?: boolean,
>     embed_pdf_metadata_dpi?: number,
>     persist_results?: boolean,
>     timeout?: number | null,
>     page_range?: {
>       start?: number | null,
>       end?: number | null
>     } | {
>       start?: number | null,
>       end?: number | null
>     }[] | number[] | null,
>     document_password?: string | null,
>     model?: string | null
>   }
> }
> ```

> [accordion] split\_description full type
>
> ```ts theme={null}
> {
>   name: string,
>   description: string,
>   partition_key?: string | null
> }[]
> ```

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   table_cutoff?: truncate | preserve,
>   allow_page_overlap?: boolean,
>   auto_partition?: boolean,
>   deep_split?: boolean,
>   force_url_result?: boolean
> }
> ```

> [accordion] async full type
>
> ```ts theme={null}
> {
>   metadata?: Record<string, any> | null,
>   priority?: boolean,
>   webhook?: {
>     mode: direct,
>     url: string
>   } | {
>     mode: svix,
>     channels?: string[]
>   } | {
>     mode: disabled,
>     channels?: string[]
>   } | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | — |

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.