Docling Layout Heron

DOCLING_LAYOUT_HERON

Finds the layout of a document page, such as text blocks, titles, section headers, tables, pictures, captions, formulas, lists, code, forms and page headers and footers, with a box around each.

Vision & Analysisobject-detectiondocument-layoutdocumentsragapache-2.0Fine-tunable
Docling Layout Heron: Vision & Analysis model on Kainguru

About Docling Layout Heron

Capabilities

  • 17 layout classes — text, title, section header, table, picture, caption, footnote, formula, list item, page header and footer, code, document index, checkboxes, forms and key-value regions
  • Pages into parts — crop the tables, figures and text blocks it finds for OCR, table reading or search indexes
  • Fine-tunable — train it on your own pages, with its labels or a label set of your own

Good to know

  • Send one page as an image. The model sees it resized to 640x640 pixels; boxes come back in pixels of the page you send.
  • It returns boxes, not text: read the text with an OCR model, and table cells with TABLE_TRANSFORMER.
  • Its labels are caption, footnote, formula, list_item, page_footer, page_header, picture, section_header, table, text, title, document_index, code, checkbox_selected, checkbox_unselected, form and key_value_region.
  • Images must be PNG, JPEG or WebP, at most 20 MB and 40 megapixels.
  • Fine-tuning takes your images and a JSONL manifest with one {"file", "boxes", "labels"} line per image. Training with only the model's own labels keeps them; any other label gives a model that knows exactly your labels.
  • A fine-tuning dataset is 4 to 1,000 images, each PNG, JPEG or WebP of at most 20 MB and 40 megapixels, and 4 GB in all, with up to 100 boxes per image and 100 different labels of up to 64 characters.

Docling Layout Heron inputs and output

NameTypeRequiredDefaultDetails
imagefileYes—The picture to search: PNG, JPEG or WebP, up to 20 MB and 40 megapixels.
1–2048 characters · image/png, jpeg, webp
thresholdnumberNo—Lowest score to return, 0 to 1; higher returns fewer, surer boxes. Empty uses the model's recommended value.
0–1

Output. JSON array, best first: [{"label": "...", "score": 0.87, "box": [x0, y0, x1, y1]}, ...], box corners in pixels of the image, at most 300 boxes.

Run Docling Layout Heron with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=DOCLING_LAYOUT_HERON" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "image": "https://example.com/input.png"
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "DOCLING_LAYOUT_HERON",
        {
          "image": "https://example.com/input.png"
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune Docling Layout Heron

You can fine-tune Docling Layout Heron on your own data and run the tuned model through the same API. Dataset: Images plus a JSONL manifest, one {"file", "boxes", "labels"} per image: file as its upload returned it, boxes [[x0, y0, x1, y1], ...] in pixels, a label per box. 4 to 1000 images, 100 boxes each, 100 labels of up to 64 characters.

The steps are in the docs.

Docling Layout Heron pricing

Price per request: 0.0437 credits ($0.000437). The price is shown again before every run; all prices are on the pricing page.

Licence and source

Grounding DINO Base: Vision & Analysis model on Kainguru
Vision & Analysis

Grounding DINO Base

Finds the things you name in a picture, such as "red car, person with a helmet", and returns a box around each one.

Fine-tunable
Moondream 2: Vision & Analysis model on Kainguru
Vision & Analysis

Moondream 2

Moondream 2 is a small vision model: it answers questions about a picture, writes short, normal or long captions and…

Fine-tunable
OWLv2 Base: Vision & Analysis model on Kainguru
Vision & Analysis

OWLv2 Base

Finds the things you name in a picture, even rare or unusual ones, and returns a box around each one.

Fine-tunable
RF-DETR Large: Vision & Analysis model on Kainguru
Vision & Analysis

RF-DETR Large

Detects the 80 everyday object classes of COCO, such as people, vehicles, animals, food and household items, with a…

Fine-tunable
Table Transformer: Vision & Analysis model on Kainguru
Vision & Analysis

Table Transformer

Reads the structure of a table in an image, finding its rows, columns, column headers, projected row headers and…

Fine-tunable
Florence-2 Large: Vision & Analysis model on Kainguru
Vision & Analysis

Florence-2 Large

One small vision model that captions images, reads text, boxes objects and finds things named by a phrase.

Fine-tunable