drmingler/docling-api
FastAPI and Celery service for converting documents to Markdown before RAG ingestion
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Docling-api is the document conversion service at the front of a RAG pipeline, not a database or retrieval engine. The Python 3.12 FastAPI application runs at main:app under Uvicorn and accepts multipart uploads through python-multipart. Docling performs the parsing and Markdown conversion; the API exposes both request/response conversion and asynchronous job submission with status polling.
Celery workers run background jobs, Redis serves as the default broker and result backend, and Flower provides task and worker visibility. CELERY_BROKER_URL and CELERY_RESULT_BACKEND can be set independently or fall back to REDIS_HOST. The root layout separates document_converter/ from worker/, and the local worker entrypoint is worker.celery_config. HTTP is the integration boundary; chunking, indexing, and retrieval belong downstream.
Key Capabilities & Differentiators
Supported inputs include PDF, DOCX, PPTX, HTML, CSV, AsciiDoc, Markdown, and JPG, PNG, TIFF, and BMP images. The conversion pipeline extracts text, tables, and images and supports multilingual OCR, including English, French, German, Spanish, Italian, and Portuguese. Clients can set image_resolution_scale from 1 to 4 and use extract_tables_as_images when a visual representation of the table is needed.
Single documents and batches are supported in both synchronous and asynchronous modes. For example, POST /documents/convert returns a single conversion in the request, while POST /conversion-jobs and POST /batch-conversion-jobs submit background work. Both modes enforce configurable upload limits, defaulting to 100 MB per file and 500 MB per batch, and return HTTP 413 on oversized uploads. Those limits constrain input size, not conversion time or peak memory.
Trade-offs & Limitations
Compared with embedding Docling directly in a Python application, this service provides a shared HTTP contract, queued conversion, and worker monitoring. The cost is operating Redis and workers alongside the API. The examples alongside Marker, PyPDF, and PyMuPDF4LLM are useful for inspecting output, but they do not establish an accuracy or throughput ranking. Compare reading order, table structure, and OCR quality on the documents your downstream system will actually ingest.
Use synchronous requests where conversion reliably fits the caller's timeout; queue slower scans and larger batches. CPU mode avoids a GPU runtime dependency, while GPU mode is worth testing when sustained throughput is the bottleneck. Size workers against peak load: concurrent conversions and higher image resolution can increase memory demand, and no fixed VRAM requirement or measured speedup is specified. The MIT license covers the repository code; review dependency and model-artifact terms separately.
Hardware & Deployment Guide
For a CPU deployment, run docker compose up --build --scale celery_worker=1. The default Compose API runs uvicorn --port 8080 --host 0.0.0.0 main:app as UID/GID 10001:10001 with no-new-privileges, and mounts a named volume at /models. For GPU processing, use docker compose -f docker-compose.gpu.yml up --build --scale celery_worker=3 on a GPU-capable Docker host. Three workers is an example, not a hardware sizing recommendation.
A native setup uses Python 3.12, Poetry, Redis, Uvicorn, and a Celery worker; Flower is optional. Use /health for API liveness and /health/ready for broker reachability. Neither probe proves that a worker can complete a conversion, so add a representative test job to deployment verification. Restrict network access to Redis and Flower, and check model availability before assuming the service can start in an air-gapped environment. The package manifest lists version 0.1.0; no GitHub release milestones are listed, so pin a tested commit for repeatable deployments.
image_resolution_scale accepts 1–4; extract_tables_as_images controls table image extraction.REDIS_HOST./health checks API liveness, /health/ready checks broker reachability, and Flower monitors Celery tasks and workers.Self-hosted RAG ingestion teams that need a shared HTTP service for parsing mixed document batches, with OCR and trackable background jobs.
You need a vector database or end-to-end retrieval stack, or a single Python application can call Docling directly without running Redis and Celery workers.
Quick Start & Installation
curl -sSL https://install.python-poetry.org | python3 -
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| docling-api ★ | 1.5k | — | Python | MIT | FastAPI and Celery service for converting documents to Markdown before RAG inges |
| marker | 41.2k | +103 | Python | Apache-2.0 | Hybrid OCR and layout parsing for document ingestion in RAG pipelines |
| MinerU | 84.7k | +326 | Python | — | Local document parser and library for structured RAG ingestion and page-level ci |
| docling | 71.4k | +285 | Python | MIT | Local-first document parser for structure-aware RAG ingestion |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/drmingler/docling-api.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about docling-api
How should a RAG ingestion pipeline integrate with the API?
POST /documents/convert for a single conversion whose result you need in the same request. For background processing, submit to POST /conversion-jobs and poll GET /conversion-jobs/{job_id}. Submit batches to POST /batch-conversion-jobs. Feed the resulting Markdown into your own chunking, embedding, and indexing stages.Do I need a GPU, and how should I size the workers?
Can we self-host it in a commercial product?
When is this preferable to using a parser directly?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy