# Configuration

Configure the API to your needs

Different applications have different needs. FracturAI API is designed to be flexible and customizable to meet your specific requirements.

We support the following configuration options:

* `chunk_processing`: Controls the setting for the chunking and post-processing of each chunk.
* `expires_in`: The number of seconds until task is deleted.
* `high_resolution`: Whether to use high-resolution images for cropping and post-processing.
* `ocr_strategy`: Controls the Optical Character Recognition (OCR) strategy.
* `pipeline`: Options for layout analysis and OCR providers.
* `segment_processing`: Controls the post-processing of each segment type. Allows you to generate HTML, markdown and run custom VLM prompts.
* `segmentation_strategy`: Controls the segmentation strategy

The configuration options can be combined to create a customized processing pipeline. When a `Task` is created, the configuration is done through the `Configuration` object.

Here is an example of how to configure the API to use a VLM to generate HTML and markdown for each page:

PythoncURL

```python
from Fractur import Fractur
from Fractur_ai.models import (
    Configuration, 
    GenerationConfig, 
    GenerationStrategy, 
    SegmentProcessing, 
    SegmentationStrategy
)

Fractur = Fractur()

Fractur.upload("path/to/file", Configuration(
    segment_processing=SegmentProcessing(
        page=GenerationConfig(
            html=GenerationStrategy.LLM, 
            markdown=GenerationStrategy.LLM
        )
    ),
    segmentation_strategy=SegmentationStrategy.PAGE,
))
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fractur.gitbook.io/fractur/features/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
