# Chunkr

> Open-source document intelligence API for layout analysis, OCR, and semantic chunking

- Category: Retrieval & Knowledge (RAG) / Parsing & Ingestion
- Licence: AGPL-3.0
- Repository: https://github.com/lumina-ai-inc/chunkr
- Website: https://chunkr.ai
- Canonical page: https://ai-tldr.dev/tools/chunkr/

## In short

Chunkr is a self-hosted document intelligence service that converts PDFs, PowerPoint files, Word documents, and images into structured, LLM-ready chunks. It runs layout analysis and OCR with bounding boxes, then outputs structured HTML and Markdown that you can feed into a retrieval pipeline. It sits in the Parsing & Ingestion category of the Retrieval & Knowledge (RAG) tools and is open-source, licensed AGPL-3.0.

## Overview

Chunkr is a self-hosted document intelligence service that converts PDFs, PowerPoint files, Word documents, and images into structured, LLM-ready chunks. It runs layout analysis and OCR with bounding boxes, then outputs structured HTML and Markdown that you can feed into a retrieval pipeline.

It is built for developers who need a document ingestion step in front of a RAG system and want to run it on their own infrastructure. The open-source AGPL release uses community and open-source models, while the separate Chunkr Cloud API runs proprietary in-house models for higher accuracy and adds features like native Excel parsing.

Within the parsing and ingestion category, Chunkr handles the messy first stage of a retrieval pipeline: detecting document structure, reading text from scanned pages, and splitting content into coherent chunks before embedding and indexing.

## What it does

- Layout analysis that detects document structure across PDFs, PPTs, Word docs, and images
- OCR with bounding boxes so extracted text keeps its position on the page
- Outputs structured HTML and Markdown plus semantic chunks ready for RAG and LLM use
- Vision-language model processing for handling complex page content
- Configurable LLM backends via a models.yaml file or environment variables, using any OpenAI-compatible endpoint
- Self-hosted deployment with Docker Compose, with GPU, CPU-only, and Mac ARM compose files

## Getting started

The open-source version runs locally with Docker Compose. Clone the repo, set up your configuration, and start the services.

1. Clone the repository

   You need Docker and Docker Compose installed. The NVIDIA Container Toolkit is optional and only needed for GPU support.

```bash
git clone https://github.com/lumina-ai-inc/chunkr
cd chunkr
```

2. Set up environment and model config

   Copy the example environment file and the example models file, then edit models.yaml to point at your LLM provider.

```bash
cp .env.example .env
cp models.example.yaml models.yaml
```

3. Start the services

   Use the default command for GPU, or pick the CPU-only or Mac ARM compose overrides if you do not have a GPU.

```bash
# For GPU deployment:
docker compose up -d

# For CPU-only deployment:
docker compose -f compose.yaml -f compose.cpu.yaml up -d

# For Mac ARM architecture (M1, M2, M3, etc.):
docker compose -f compose.yaml -f compose.cpu.yaml -f compose.mac.yaml up -d
```

4. Access the web UI and API

   Once the containers are running, open the web UI in your browser and send documents to the API.

```text
# Web UI: http://localhost:5173
# API:    http://localhost:8000
```

## When to use it

- Building the ingestion stage of a RAG pipeline that turns PDFs and Office files into clean, chunked text
- Extracting text and layout from scanned documents and images where positional bounding boxes matter
- Converting reports, slide decks, and Word documents into structured Markdown or HTML for downstream LLM processing
- Self-hosting document parsing on your own infrastructure when data cannot leave your environment
