Deployment · HTTP service
docling-serve: Docling as an HTTP Service
Embedding Docling in every app that needs it is how you end up maintaining five CUDA environments. docling-serve (also written docling serve) puts one Docling behind an HTTP API on port 5001 — with a UI, a REST surface, and container images for CPU and CUDA.
Updated 2026-10-26 · 3 min read
The short version
- –Install with
pip install docling-serve, run withdocling-serve run --enable-ui. The API is on127.0.0.1:5001, docs at/docs, UI at/ui. - –There are separate images for CPU and CUDA (
cu128,cu130). CUDA images are not taggedlatest— pin a version tag. - –Conversion is
POST /v1/convert/sourcefor URLs and/v1/convert/filefor uploads; chunking has its own endpoints for RAG ingestion. - –A local docling-serve is for your own machines. A shared one needs auth, queueing and a page budget, or one 600-page filing will starve every other request.
Run it locally in two commands
The UI is a real advantage during development: drop a file, see the Markdown and JSON, and confirm the service is behaving before you write a client against it.
Without --enable-ui you get the API only. That is the right configuration for anything reachable from another machine — the UI is a debugging tool, not a secured console.
pip install docling-serve
docling-serve run --enable-ui
# API http://127.0.0.1:5001
# OpenAPI http://127.0.0.1:5001/docs
# Playground http://127.0.0.1:5001/uiDocker and the image matrix
| Variant | Image | Notes |
|---|---|---|
| Base | ghcr.io/docling-project/docling-serve or quay.io/…/docling-serve | Default entry point. |
| CPU-only | docling-serve-cpu | Smaller, slower, no CUDA libraries. |
| CUDA 12.8 | docling-serve-cu128 | GPU acceleration; pin an explicit version tag. |
| CUDA 13.0 | docling-serve-cu130 | Newest CUDA; also pin a version. |
| ROCm 6.3 | docling-serve-rocm | Supported but not published as an image — build it yourself. |
podman run -p 5001:5001 \
-e DOCLING_SERVE_ENABLE_UI=1 \
quay.io/docling-project/docling-serve
# same command with docker
docker run -p 5001:5001 -e DOCLING_SERVE_ENABLE_UI=1 \
quay.io/docling-project/docling-serveDo not run the CUDA images on a host without a matching driver and rely on "it started". The process will come up and then fail at the first conversion, which is a much worse debugging experience than a failed pull.
The REST surface
The API is versioned under /v1. The two conversion entry points cover almost every integration:
| Endpoint | Use it for |
|---|---|
POST /v1/convert/source | Convert a document by URL (or an inline source) without uploading bytes. |
POST /v1/convert/file | Multipart upload — the normal path for files on the caller's disk. |
/v1/convert/source/async (and file async) | Long documents: submit, poll status, then fetch the result. |
/v1/chunk/hybrid/…, /v1/chunk/hierarchical/… | Chunk a document for retrieval instead of converting it whole. |
curl -X POST http://localhost:5001/v1/convert/source \
-H 'Content-Type: application/json' \
-d '{
"sources": [{ "kind": "http", "url": "https://arxiv.org/pdf/2501.17887" }],
"options": { "to_formats": ["md", "json"], "do_ocr": true, "table_mode": "accurate" }
}'Configuration and auth
docling-serve is configured through environment variables. The ones that matter operationally:
DOCLING_SERVE_ENABLE_UI=1— expose the playground at/ui.- API key protection: when enabled, clients send
X-Api-Key. Do not expose an unauthenticated instance to the internet; a document converter is a CPU/GPU denial-of-service waiting to happen. - Artifacts path: point the service at pre-downloaded models so restarts do not re-fetch weights.
- Worker concurrency and engine selection: these decide whether two concurrent 200-page PDFs queue politely or OOM the box.
The exact variable names have changed across releases (the docs list them under configuration rather than the README). Grep the instance's /docs and the configuration page for your pinned version instead of copying a blog post.
Where a self-hosted service stops being the right answer
A local docling-serve is excellent: predictable, private, free, and it turns a Python library into something your Node app, your n8n workflow and your batch script can all call. It is the correct architecture for a team that already runs infrastructure.
It is the wrong architecture when the service is one person's laptop, or when the queue is the product. Once you need per-request isolation, page limits, retries, and a result that can be downloaded by someone who is not you, you have built a hosted converter — at which point maintaining it competes with the actual work.
That is the gap the hosted Docling OCR UI fills: same family of pipeline, no 500-page job blocking the box, and a spreadsheet at the end if that is what you needed. If the goal is a file rather than an API, start there and come back to docling-serve when you need to embed conversion into software.
Frequently asked questions
What port does docling-serve use?+
5001 by default. The API, the OpenAPI docs at /docs and the UI at /ui all live on that port.
How do I run docling-serve in Docker?+
docker run -p 5001:5001 -e DOCLING_SERVE_ENABLE_UI=1 quay.io/docling-project/docling-serve, or use the -cpu / -cu128 / -cu130 variants. Pin a version tag for CUDA images.
Is there an official hosted Docling API?+
docling-serve is the official self-hosted service. Managed hosting is a separate matter — if you want conversion without running a server, use a hosted UI or your own cloud deployment of the container.
Can docling-serve chunk documents for RAG?+
Yes. The v1 API exposes chunk endpoints (hybrid and hierarchical), which is usually what you want instead of chunking Markdown yourself afterwards.
How do I secure it?+
Enable API key authentication and send X-Api-Key from clients. Never expose the UI publicly, and cap upload size and page count at the proxy layer.
Do I need a GPU?+
No, but the CPU image is several times slower on table-heavy documents. Start on CPU with the fast table mode, measure, and only then pay for GPU capacity.
Try it online
Run the same pipeline in the browser — no install, no uploads stored.
Try it in the browserKeep reading
- Docling MCP server
When the caller is an agent, not an app
- Install Docling
The library path
- Chunking for RAG
What the chunk endpoints return
- CLI reference
convert-remote uses this API
- Troubleshooting
OOM, slow first requests
- Hosted Docling UI
No server to run