Skip to content

OPEN SOURCE DOCUMENT PROCESSING

Many arms.
One API.

Your documents, ready for what’s next.

Turn PDFs, Office files, and scans into structured, LLM-ready data. One self-hosted gateway. The right engine for the job.

Python 3.12 Self-hosted MIT licensed

LESS GLUE. MORE BUILDING.Python
import doctopus

# A document in. Structured data out.
doc = doctopus.parse("paper.pdf")

print(doc.markdown)
print(doc.tables)
print(doc.processing.backend)

# Ready for your retrieval pipeline.
chunks = doctopus.chunk("paper.pdf")
8processing engines
4ways to connect
1consistent schema

Meet the engines ↗

A SMALLER STACK

Everything you need.
Less to wire together.

01 / ROUTING

The right engine, explained.

Start with lightweight Xberg. Add engines as you need them. The router selects by format, mode, and available memory, and records why.

How routing works

02 / STRUCTURE

Different inputs. Same shape.

Get Markdown, text, tables, and structured blocks through one versioned schema. Export heading-aware chunks that keep tables intact.

Explore the output

03 / CONTROL

Your infrastructure. Your call.

Run locally or deploy with Docker. Choose your engines and connect through Python, the command line, REST, or an MCP client.

Deploy Doctopus

FITS YOUR WORKFLOW

Start small.
Build from here.

Install the package, parse a document, and put the output to work. Use the same gateway from your terminal, application, or agent.

Read the quick start

OCR and layout engines may download model weights on first use.

pip install doctopus-ai
doctopus parse paper.pdf

# Return structured output
doctopus parse paper.pdf --format json

# Build a retrieval corpus
doctopus chunk ./corpus --output corpus.jsonl
import doctopus

doc = doctopus.parse("paper.pdf")
print(doc.markdown)
print(doc.processing.decision.reasons)

chunks = doctopus.chunk(
    "paper.pdf", max_chars=1500
)
# Start the API and drag-and-drop demo
doctopus serve --port 8000

# Parse a document
curl -F file=@paper.pdf \
  http://localhost:8000/v1/parse
{
  "mcpServers": {
    "doctopus": {
      "command": "doctopus",
      "args": ["mcp", "--root", "/path/to/docs"]
    }
  }
}

UNDER THE HOOD

A clear path from file to data.

  1. 01Inspect

    Read the format, size, and available resources.

  2. 02Route

    Choose an available engine for the job.

  3. 03Extract

    Parse content, with at most one fallback when needed.

  4. 04Build

    Return a document with content and processing details.

Make your first document useful.

A couple of commands is a good place to start.

Get started

Doctopus is MIT licensed. Backend packages and model weights have their own licenses.