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

# O C R Config • Rust AI Agent SDK

> OCRConfig: Configuration for OCR settings.

# OCRConfig

> Defined in the [**agents**](../modules/agents) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Configuration for OCR settings.

## Fields

| Name                   | Type                           | Description                           |
| ---------------------- | ------------------------------ | ------------------------------------- |
| `include_image_base64` | `bool`                         | Include base64 image data in response |
| `pages`                | `Option&lt;Vec&lt;u32&gt;&gt;` | Specific pages to process             |
| `image_limit`          | `Option&lt;u32&gt;`            | Maximum number of images to process   |
| `timeout`              | `u32`                          | Timeout in seconds                    |
| `api_base`             | `Option&lt;String&gt;`         | API base URL                          |
| `api_key`              | `Option&lt;String&gt;`         | API key                               |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new() -> Self
```

Create a new OCRConfig

### `pages`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn pages(mut self, pages: Vec<u32>) -> Self
```

Set pages to process

**Parameters:**

| Name    | Type             |
| ------- | ---------------- |
| `pages` | `Vec&lt;u32&gt;` |

### `image_limit`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn image_limit(mut self, limit: u32) -> Self
```

Set image limit

**Parameters:**

| Name    | Type  |
| ------- | ----- |
| `limit` | `u32` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/agents/mod.rs#L561">
  `praisonai/src/agents/mod.rs` at line 561
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Configuration" icon="gear" href="/docs/rust/configuration" />

  <Card title="Rust Installation" icon="download" href="/docs/rust/installation" />

  <Card title="Rust OCR" icon="file-image" href="/docs/rust/ocr" />

  <Card title="Rust Documents" icon="file-lines" href="/docs/rust/documents" />
</CardGroup>
