---
title: "Processing settings"
description: "Page ranges, timeouts, passwords, returned images, and other Parse settings"
---

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

# Processing settings

The `settings` group controls how a request runs: which pages to read, how long to wait, how to return results, and special cases such as password-protected files. All settings on this page work with r-1.

Settings that only applied to legacy Parse, such as `ocr_system` and `extraction_mode`, are on [Legacy Parse settings](/configs/parse/legacy).

## Page Range

Process only specific pages to save time and credits. See [Page Ranges](/configs/parse/page-ranges) for complete documentation.

**Python**

```python
# Pages 1-10 only
settings={"page_range": {"start": 1, "end": 10}}

# Multiple ranges
settings={"page_range": [{"start": 1, "end": 5}, {"start": 20, "end": 25}]}
```

**Node.js**

```javascript
// Pages 1-10 only
settings: { page_range: { start: 1, end: 10 } }

// Multiple ranges
settings: { page_range: [{ start: 1, end: 5 }, { start: 20, end: 25 }] }
```

**cURL**

```bash
# Pages 1-10 only
"settings": {"page_range": {"start": 1, "end": 10}}

# Multiple ranges
"settings": {"page_range": [{"start": 1, "end": 5}, {"start": 20, "end": 25}]}
```

## Timeout

Set a maximum processing time in seconds. If processing exceeds this limit, the request fails rather than hanging indefinitely.

**Python**

```python
settings={"timeout": 300}  # 5 minutes
```

**Node.js**

```javascript
settings: { timeout: 300 }  // 5 minutes
```

**cURL**

```bash
"settings": {"timeout": 300}
```

If not specified, Reducto uses internal defaults appropriate for the document size.

## Embedded Document Properties

Set `extract_document_properties` to `true` to return properties embedded in the original pre-conversion file, including PDF Info/XMP and OOXML core properties. This setting defaults to `false`.

**Python**

```python
result = client.parse.run(
    input=upload.file_id,
    settings={"model": "r-1", "extract_document_properties": True}
)
```

**Node.js**

```javascript
const result = await client.parse.run({
  input: upload.file_id,
  settings: { model: "r-1", extract_document_properties: true }
});
```

**cURL**

```bash
curl -X POST https://platform.reducto.ai/parse \
  -H "Authorization: Bearer $REDUCTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "reducto://your-file-id",
    "settings": {"model": "r-1", "extract_document_properties": true}
  }'
```

The response includes a top-level `document_properties` object for supported files with embedded properties. It is `null` when no properties are found or the input format is unsupported. Supported formats are PDF, DOCX, XLSX, and PPTX. Legacy binary `.doc`, `.xls`, and `.ppt` files are not supported. Each field is nullable, and dates use timezone-aware ISO-8601 strings.

PDF Info/XMP populates `title`, `author`, `subject`, `keywords`, `creator`, `producer`, `created_at`, and `modified_at`. `last_modified_by` is only available from OOXML core properties. DOCX, XLSX, and PPTX can populate `title`, `author`, `subject`, `keywords`, `creator`, `last_modified_by`, `created_at`, and `modified_at`; `producer` is PDF-only.

```json
{
  "document_properties": {
    "title": "Quarterly Report",
    "author": "Jane Smith",
    "subject": "Financial results",
    "keywords": "finance, quarterly",
    "creator": "Microsoft Word",
    "producer": null,
    "last_modified_by": "Alex Chen",
    "created_at": "2024-01-15T09:30:00+00:00",
    "modified_at": "2024-02-01T16:45:12+00:00"
  }
}
```

## Password-Protected Documents

For encrypted PDFs that require a password to open:

**Python**

```python
settings={"document_password": "secret123"}
```

**Node.js**

```javascript
settings: { document_password: 'secret123' }
```

**cURL**

```bash
"settings": {"document_password": "secret123"}
```

The password is used to decrypt the document before processing. It's transmitted securely but not stored.

## Return Images

By default, blocks contain only extracted text. Enable `return_images` to get pre-signed URLs pointing to cropped images of specific block types:

**Python**

```python
settings={"return_images": ["figure", "table"]}
```

**Node.js**

```javascript
settings: { return_images: ['figure', 'table'] }
```

**cURL**

```bash
"settings": {"return_images": ["figure", "table"]}
```

When enabled, applicable blocks include an `image_url` field:

```json
{
  "type": "Figure",
  "bbox": {"left": 0.1, "top": 0.2, "width": 0.8, "height": 0.4, "page": 1},
  "content": "Bar chart showing quarterly revenue growth from Q1 to Q4...",
  "image_url": "https://storage.reducto.ai/figures/abc123.png?X-Amz-Expires=3600..."
}
```

The URL is a pre-signed S3 link valid for a limited time. Download or process the image before expiration.

**Options:**
- `figure`: Cropped images for figure blocks (charts, diagrams, photos, illustrations)
- `table`: Cropped images for table blocks

## Return OCR Data

Returns word-level and line-level OCR data with bounding boxes. r-1 and legacy Parse include OCR at no extra charge. With r-1 mini, OCR is an add-on at a list price of $1 per 1,000 pages (see [Usage and Pricing](/reference/credit-usage#parse-endpoint)). For word positions in the Parse output, use Parse citations instead.

**Python**

```python
settings={"return_ocr_data": True}
```

**Node.js**

```javascript
settings: { return_ocr_data: true }
```

**cURL**

```bash
"settings": {"return_ocr_data": true}
```

The response `result` object includes an `ocr` field containing `words` and `lines` arrays:

```json
{
  "job_id": "parse_abc123xyz",
  "result": {
    "type": "full",
    "chunks": [...],
    "ocr": {
      "words": [
        {
          "text": "Revenue",
          "bbox": {"left": 0.12, "top": 0.08, "width": 0.15, "height": 0.02, "page": 1},
          "confidence": 0.98,
          "rotation": 0
        }
      ],
      "lines": [
        {
          "text": "Revenue Report Q4 2024",
          "bbox": {"left": 0.12, "top": 0.08, "width": 0.45, "height": 0.02, "page": 1},
          "confidence": 0.97,
          "rotation": 0
        }
      ]
    }
  }
}
```

Each word and line includes:
- `text`: The recognized text
- `bbox`: Normalized bounding box (coordinates as fractions of page dimensions)
- `confidence`: OCR confidence score between 0 and 1
- `rotation`: Detected rotation angle in degrees (0-360, counterclockwise)

## Persist Results

By default, processed results are stored temporarily and eventually deleted. Enable persistence to keep results indefinitely in long-term storage:

**Python**

```python
settings={"persist_results": True}
```

**Node.js**

```javascript
settings: { persist_results: true }
```

**cURL**

```bash
"settings": {"persist_results": true}
```

When enabled, you can retrieve results later using the job ID without reprocessing the document. The response includes a `job_id` that serves as the retrieval key:

```json
{
  "job_id": "parse_abc123xyz",
  "duration": 2.34,
  "result": {...}
}
```

Retrieve stored results later:

**Python**

```python
job = client.job.get("parse_abc123xyz")
result = job.result
```

**Node.js**

```javascript
const job = await client.job.retrieve('parse_abc123xyz');
const result = job.result;
```

**cURL**

```bash
curl https://platform.reducto.ai/job/parse_abc123xyz \
  -H "Authorization: Bearer $REDUCTO_API_KEY"
```

> **Note:** Requires opting in to Reducto Studio. Contact support to enable this feature for your organization.

## Embed PDF Metadata

Embeds the OCR-extracted text back into the PDF as a hidden text layer. The response includes a `pdf_url` pointing to the enhanced PDF:

**Python**

```python
settings={"embed_pdf_metadata": True}
```

**Node.js**

```javascript
settings: { embed_pdf_metadata: true }
```

**cURL**

```bash
"settings": {"embed_pdf_metadata": true}
```

```json
{
  "job_id": "parse_abc123xyz",
  "pdf_url": "https://storage.reducto.ai/pdfs/abc123.pdf?...",
  "result": {...}
}
```

### Render DPI

By default we render the source PDF at 200 DPI when building the embedded-OCR PDF — small files, sharp at default zoom in a doc viewer, slight softness only past ~200% zoom. To control this directly, pass `embed_pdf_metadata_dpi` (range 50-250):

**Python**

```python
settings={"embed_pdf_metadata": True, "embed_pdf_metadata_dpi": 150}
```

**Node.js**

```javascript
settings: { embed_pdf_metadata: true, embed_pdf_metadata_dpi: 150 }
```

**cURL**

```bash
"settings": {"embed_pdf_metadata": true, "embed_pdf_metadata_dpi": 150}
```

Higher values preserve more detail when zoomed in but produce larger PDFs; lower values shrink the output but soften the rendered text at high zoom. Pick close to the source scan DPI for scan-derived PDFs; the default 200 is right for most digital documents.

The returned PDF looks identical to the original but now supports:
- Text selection and copy/paste in PDF viewers
- Full-text search within the document
- Accessibility features (screen readers can read the text)

## Force URL Result

By default, Reducto returns the full result inline in the response. For very large documents, this is automatically switched to a URL. You can force URL mode regardless of size:

**Python**

```python
settings={"force_url_result": True}
```

**Node.js**

```javascript
settings: { force_url_result: true }
```

**cURL**

```bash
"settings": {"force_url_result": true}
```

When enabled, the response contains a URL instead of inline content:

```json
{
  "job_id": "parse_abc123xyz",
  "result": {
    "type": "url",
    "url": "https://storage.reducto.ai/results/abc123.json?...",
    "result_id": "abc123"
  }
}
```

Fetch the full result by downloading from the URL. The URL is pre-signed and valid for a limited time.

## Force File Extension

Reducto automatically detects file types from URLs and content. Override this detection when automatic detection fails or returns incorrect results:

**Python**

```python
settings={"force_file_extension": ".pdf"}
```

**Node.js**

```javascript
settings: { force_file_extension: '.pdf' }
```

**cURL**

```bash
"settings": {"force_file_extension": ".pdf"}
```

Common scenarios:
- URLs without file extensions (e.g., `https://api.example.com/document/12345`)
- URLs with misleading extensions
- Pre-signed URLs with complex query parameters that confuse detection

Valid extensions include `.pdf`, `.png`, `.jpg`, `.docx`, `.xlsx`, `.pptx`, and all other [supported file types](/upload/overview#supported-file-types).

Source: https://docs.reducto.ai/configs/parse/settings/index.mdx
