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

# Camel.loaders.chunkr reader

<a id="camel.loaders.chunkr_reader" />

<a id="camel.loaders.chunkr_reader.ChunkrReaderConfig" />

## ChunkrReaderConfig

```python theme={"system"}
class ChunkrReaderConfig:
```

Defines the parameters for configuring the task.

**Parameters:**

* **chunk\_processing** (int, optional): The target chunk length. (default: :obj:`512`)
* **high\_resolution** (bool, optional): Whether to use high resolution OCR. (default: :obj:`True`)
* **ocr\_strategy** (str, optional): The OCR strategy. Defaults to 'Auto'. \*\*kwargs: Additional keyword arguments to pass to the Chunkr Configuration. This accepts all other Configuration parameters such as expires\_in, pipeline, segment\_processing, segmentation\_strategy, etc. (default: `'Auto'`)
* **See**: [https://github.com/lumina-ai-inc/chunkr/blob/main/core/src/](https://github.com/lumina-ai-inc/chunkr/blob/main/core/src/) models/task.rs#L749

<a id="camel.loaders.chunkr_reader.ChunkrReaderConfig.__init__" />

### **init**

```python theme={"system"}
def __init__(
    self,
    chunk_processing: int = 512,
    high_resolution: bool = True,
    ocr_strategy: str = 'Auto',
    **kwargs
):
```

<a id="camel.loaders.chunkr_reader.ChunkrReader" />

## ChunkrReader

```python theme={"system"}
class ChunkrReader:
```

Chunkr Reader for processing documents and returning content
in various formats.

**Parameters:**

* **api\_key** (Optional\[str], optional): The API key for Chunkr API. If not provided, it will be retrieved from the environment variable `CHUNKR_API_KEY`. (default: :obj:`None`)
* **url** (Optional\[str], optional): The url to the Chunkr service. (default: :obj:`https://api.chunkr.ai/api/v1/task`) \*\*kwargs (Any): Additional keyword arguments for request headers.

<a id="camel.loaders.chunkr_reader.ChunkrReader.__init__" />

### **init**

```python theme={"system"}
def __init__(
    self,
    api_key: Optional[str] = None,
    url: Optional[str] = 'https://api.chunkr.ai/api/v1/task'
):
```

<a id="camel.loaders.chunkr_reader.ChunkrReader._pretty_print_response" />

### \_pretty\_print\_response

```python theme={"system"}
def _pretty_print_response(self, response_json: dict):
```

Pretty prints the JSON response.

**Parameters:**

* **response\_json** (dict): The response JSON to pretty print.

**Returns:**

str: Formatted JSON as a string.

<a id="camel.loaders.chunkr_reader.ChunkrReader._to_chunkr_configuration" />

### \_to\_chunkr\_configuration

```python theme={"system"}
def _to_chunkr_configuration(self, chunkr_config: ChunkrReaderConfig):
```

Converts the ChunkrReaderConfig to Chunkr Configuration.

**Parameters:**

* **chunkr\_config** (ChunkrReaderConfig): The ChunkrReaderConfig to convert.

**Returns:**

Configuration: Chunkr SDK configuration.
