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

# Layout

> Page-region detection before OCR

The **layout** model is a vision detector. It runs on a rasterized page before [OCR](/products/models-ocr) reads anything. Output is bounding boxes and a region type, not text.

It is part of convert on the [Middleware API](/products/middleware).

## Configuration

| Setting      | How it is configured                                                                                         |
| ------------ | ------------------------------------------------------------------------------------------------------------ |
| Input        | Each PDF or image page is rasterized, then detected as a whole page.                                         |
| Region types | Title, heading, paragraph, table, figure, formula, chart, seal, header, footer, footnote, number, and aside. |
| Crops        | Each box is cropped with a small pad so edges are not cut before OCR.                                        |
| Order        | Layout always runs first. OCR is per region, not a single pass over the full page.                           |
| Serving      | AiQL selects the checkpoint and thresholds. Customers do not pick a layout model.                            |
