# Segmentation Strategy

Controls the segmentation strategy

The Fractur AI API allows you to specify a `segmentation_strategy` for each document. This strategy controls how the document is segmented.

We have two strategies:

* `LayoutAnalysis`: Run our state-of-the-art layout analysis model to identify the layout elements. This is the default strategy.
* `Page`: Each segment is a page.

This is how you can configure the segmentation strategy:

PythoncURL

```python
from Fractur_ai import Fractur
from Fractur_ai.models import Configuration, SegmentationStrategy

Fractur = Fractur()

Fractur.upload("path/to/file", Configuration(
    segmentation_strategy=SegmentationStrategy.LAYOUT_ANALYSIS 
))
```

### [​](https://docs.chunkr.ai/docs/features/layout-analysis/segmentation_strategy#when-to-use-each-strategy)When to use each strategy <a href="#when-to-use-each-strategy" id="when-to-use-each-strategy"></a>

For most documents, we recommend using the `LayoutAnalysis` strategy. This will give you the best results.

Use `Page` for:

* Faster processing speed when you need quick results and layout isn’t critical
* Documents with unusual layouts that confuse the layout analysis model
* If the layout is complex but not very information dense, `Page` + VLM can generate surprisingly good HTML and markdown (see [Segment Processing](https://docs.chunkr.ai/docs/features/segment-processing)).


---

# 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/what-is-layout-analysis/segmentation-strategy.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.
