Skip to content

Commit ef9bb95

Browse files
authored
docs: add API server usage pages (#3596)
* docs: add API server overview page (docling-serve) Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: add API server deployment page (launch modes + managed callout) Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: add API server REST API page Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: add API server sub-group to Usage nav Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: link the API server from the homepage features Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: add base64 upload example and subprocess warning to API server pages Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: address review — picture-description deprecation, ocr_preset, correct enrichment cross-links, admonition + terminology consistency Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: restructure API server overview & deployment per team feedback - Overview: 'When to use what?' table; 'Getting started' (service URL + optional API key, localhost for local runs) replacing the managed/self-hosted tabs - Move the configuration model from Overview into Deployment - Add a high-level 'Compute engines' (local / RQ / KFP-Ray) concept section Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: add Fully managed page for API server (Docling for IBM watsonx) Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: refine API server overview & managed page per team feedback - Overview: 'Run Docling directly...' wording + note REST API works from Python; reframe the MCP note as 'use the API server from an MCP agent' (remote mode); Getting started drops the local-launch how-to; trim the Architecture cross-link - Managed page: retitle 'Why use the managed service'; add 'Available managed services' > 'Docling for IBM watsonx' (product link; free trial kept hidden) - nav label 'Fully managed' -> 'Managed service' Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: document running the MCP server against a remote Docling API (remote mode) Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: document the DoclingServiceClient Python client on the REST API page Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> * docs: tighten DoclingServiceClient snippet per review Use Path instead of a path string and drop the empty api_key argument. Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com> --------- Signed-off-by: Mingxuan Zhao <43148277+mingxzhao@users.noreply.github.com>
1 parent 0db276d commit ef9bb95

7 files changed

Lines changed: 382 additions & 0 deletions

File tree

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Docling simplifies document processing, parsing diverse formats — including ad
4646
* 👓 Support of several Visual Language Models ([GraniteDocling](https://huggingface.co/ibm-granite/granite-docling-258M))
4747
* 🎙️ Audio support with Automatic Speech Recognition (ASR) models
4848
* 🔌 Connect to any agent using the [MCP server](https://docling-project.github.io/docling/usage/mcp/)
49+
* 🌐 Run Docling as a service with the [API server](https://docling-project.github.io/docling/usage/api_server/) (docling-serve)
4950
* 💻 Simple and convenient CLI
5051

5152
### What's new
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
<!-- Source: docling-serve@v1.21.0 — keep in sync on serve releases that touch config/deployment/usage. -->
2+
!!! info "Synced from docling-serve v1.21.0"
3+
This page summarizes the [docling-serve](https://github.com/docling-project/docling-serve) documentation at **v1.21.0**. For the exhaustive reference, follow the links to the source repository.
4+
5+
# Deployment
6+
7+
Get docling-serve running on one machine fast. For cluster/production hardening, follow the links to the [docling-serve repo](https://github.com/docling-project/docling-serve/tree/v1.21.0/docs).
8+
9+
Two independent choices shape how you run it:
10+
11+
- **How you start the process** — the `docling-serve` command, or **Docker Compose**.
12+
- **Which [compute engine](#compute-engines) runs the jobs** (`DOCLING_SERVE_ENG_KIND`) — the in-process **Local** engine (default), or the Redis-backed **RQ** engine.
13+
14+
| | Local engine (default) | RQ engine (Redis + workers) |
15+
|---|---|---|
16+
| **`docling-serve` command** | Quickstart / dev | Distributed |
17+
| **Docker Compose** | Containerized single node (+GPU) |[serve repo](https://github.com/docling-project/docling-serve/tree/v1.21.0/docs/deploy-examples) |
18+
19+
## Configuration
20+
21+
docling-serve is configured by **CLI flags or environment variables**. Precedence is **environment variable > config file > defaults**.
22+
23+
!!! warning "Subprocess gotcha"
24+
When uvicorn runs with `--reload` or `--workers > 1` it spawns subprocesses, and CLI flags (e.g. `--enable-ui`, `--artifacts-path`) are ignored. Use the `DOCLING_SERVE_*` environment variables in those deployments.
25+
26+
### Most common settings
27+
28+
| Setting (env var) | What it does | Default |
29+
|---|---|---|
30+
| `UVICORN_HOST` / `UVICORN_PORT` | bind address / port | `0.0.0.0` / `5001` |
31+
| `UVICORN_WORKERS` | uvicorn worker processes | `1` |
32+
| `DOCLING_SERVE_API_KEY` | require an `X-Api-Key` header | unset |
33+
| `DOCLING_SERVE_ENABLE_UI` | serve the Gradio demo UI at `/ui` | `false` |
34+
| `DOCLING_SERVE_ARTIFACTS_PATH` | local path to pre-downloaded models | unset (auto-download) |
35+
| `DOCLING_SERVE_MAX_NUM_PAGES` / `DOCLING_SERVE_MAX_FILE_SIZE` | per-request limits | unset |
36+
| `DOCLING_SERVE_ENG_KIND` | async engine: `local` or `rq` (also `kfp`/`ray` — see serve repo) | `local` |
37+
38+
See the full reference in the source repo: [`configuration.md`](https://github.com/docling-project/docling-serve/blob/v1.21.0/docs/configuration.md) and [`.env.example`](https://github.com/docling-project/docling-serve/blob/v1.21.0/.env.example).
39+
40+
### Docling settings (env vars)
41+
42+
These tune Docling itself and are read by the server too:
43+
44+
| Env var | What it does | Default |
45+
|---|---|---|
46+
| `DOCLING_DEVICE` | inference device: `cpu` / `cuda` / `mps` | auto |
47+
| `DOCLING_NUM_THREADS` | CPU threads | runtime default |
48+
| `DOCLING_PERF_PAGE_BATCH_SIZE` | pages per batch | runtime default |
49+
| `DOCLING_PERF_ELEMENTS_BATCH_SIZE` | elements per batch | runtime default |
50+
| `DOCLING_DEBUG_PROFILE_PIPELINE_TIMINGS` | log per-stage timings | `false` |
51+
52+
For how to *choose* device/perf values see [GPU support](../gpu.md). For offline / air-gapped model setup see the [FAQ](../../faq/index.md) and [Advanced options](../advanced_options.md); set `DOCLING_SERVE_ARTIFACTS_PATH` to a pre-populated model directory.
53+
54+
## Compute engines
55+
56+
docling-serve runs each conversion as an asynchronous job dispatched to a **compute engine**, chosen with `DOCLING_SERVE_ENG_KIND`:
57+
58+
- **Local** (`local`, the default) — jobs run in an in-process thread pool inside the server. No external services; everything stays on one host. Tunable with `DOCLING_SERVE_ENG_LOC_NUM_WORKERS` (default `2`) and `DOCLING_SERVE_ENG_LOC_SHARE_MODELS` (default `false`). Best for a single machine.
59+
- **RQ** (`rq`) — jobs are queued in **Redis** and executed by separate `docling-serve rq-worker` processes, so the API tier and the conversion workers scale independently. Best for horizontal scaling and higher throughput.
60+
- **KFP / Ray** — Kubeflow Pipelines and Ray engines for cluster orchestration; see the [serve repo](https://github.com/docling-project/docling-serve/tree/v1.21.0/docs).
61+
62+
## Running it
63+
64+
### Simple command (Local engine — the default quickstart)
65+
66+
```sh
67+
pip install "docling-serve[ui]"
68+
docling-serve run --enable-ui # production-style: reload off, binds 0.0.0.0, UI off by default
69+
# docling-serve dev # dev: auto-reload, binds 127.0.0.1, UI on (localhost only)
70+
```
71+
72+
API at `http://localhost:5001`, interactive docs at `/docs`, demo UI at `/ui`. Smoke test:
73+
74+
```sh
75+
curl -X POST "http://localhost:5001/v1/convert/source/async" \
76+
-H "Content-Type: application/json" \
77+
-d '{"http_sources": [{"url": "https://arxiv.org/pdf/2501.17887"}]}'
78+
```
79+
80+
!!! note
81+
The demo UI (`--enable-ui` / `DOCLING_SERVE_ENABLE_UI`) is a Gradio app; files it produces are cleared from its cache after ~10 hours. It is a demonstrator, not durable storage.
82+
83+
### Docker Compose (incl. local GPU)
84+
85+
Same server, containerized. The shipped compose examples are all-in-one containers that don't set `ENG_KIND`, so they run the default Local engine.
86+
87+
```sh
88+
# Pure CPU (no compose)
89+
podman run -p 5001:5001 -e DOCLING_SERVE_ENABLE_UI=1 quay.io/docling-project/docling-serve
90+
91+
# NVIDIA GPU
92+
docker compose -f compose-nvidia.yaml up -d
93+
94+
# AMD GPU
95+
docker compose -f compose-amd.yaml up -d
96+
```
97+
98+
Compose manifests: [`compose-nvidia.yaml`](https://github.com/docling-project/docling-serve/blob/v1.21.0/docs/deploy-examples/compose-nvidia.yaml), [`compose-amd.yaml`](https://github.com/docling-project/docling-serve/blob/v1.21.0/docs/deploy-examples/compose-amd.yaml).
99+
100+
**GPU prerequisites** (host side; for the Python `AcceleratorOptions` view see [GPU support](../gpu.md) and [RTX GPU](../../getting_started/rtx.md)):
101+
102+
- NVIDIA — driver ≥ 550.54.14 + `nvidia-container-toolkit` + the nvidia container runtime.
103+
- AMD — AMDGPU/ROCm ≥ 6.3; the ROCm image is **not published**, build it with `make docling-serve-rocm-image`. Detailed GID wiring: [serve repo](https://github.com/docling-project/docling-serve/blob/v1.21.0/docs/deployment.md).
104+
105+
!!! note
106+
The compose files pin older image tags (`-cu126:main`, `-rocm72:main`) than the README image table; treat the [README image table](https://github.com/docling-project/docling-serve/blob/v1.21.0/README.md) as the source of truth and adjust the `image:` line if needed. There is no shipped single-CPU compose file — use the `podman` one-liner for pure CPU.
107+
108+
### RQ engine (distributed: Redis + separate workers)
109+
110+
The API enqueues jobs to Redis; conversion runs in separate `docling-serve rq-worker` processes.
111+
112+
```sh
113+
# 1) Redis
114+
docker run -p 6379:6379 redis:7-alpine
115+
116+
# 2) API server (enqueues jobs)
117+
DOCLING_SERVE_ENG_KIND=rq \
118+
DOCLING_SERVE_ENG_RQ_REDIS_URL=redis://localhost:6379/0 \
119+
docling-serve run
120+
121+
# 3) one or more workers (do the conversion)
122+
DOCLING_SERVE_ENG_KIND=rq \
123+
DOCLING_SERVE_ENG_RQ_REDIS_URL=redis://localhost:6379/0 \
124+
docling-serve rq-worker
125+
```
126+
127+
!!! warning
128+
The API alone *accepts* jobs but nothing runs them without at least one `rq-worker`. `DOCLING_SERVE_ENG_RQ_REDIS_URL` is required (no default) and must be identical across every API and worker process.
129+
130+
## Cluster, production & advanced variants
131+
132+
These live in the docling-serve repo (run-time manifests aren't vendored here):
133+
134+
- [OpenShift — simple deployment](https://github.com/docling-project/docling-serve/blob/v1.21.0/docs/deploy-examples/docling-serve-simple.yaml)
135+
- [Multi-worker RQ on Kubernetes](https://github.com/docling-project/docling-serve/blob/v1.21.0/docs/deploy-examples/docling-serve-rq-workers.yaml) (Redis + worker pods + secret)
136+
- [Secure deployment with oauth-proxy / TLS / Route](https://github.com/docling-project/docling-serve/blob/v1.21.0/docs/deploy-examples/docling-serve-oauth.yaml)
137+
- [ReplicaSets with sticky sessions](https://github.com/docling-project/docling-serve/blob/v1.21.0/docs/deploy-examples/docling-serve-replicas-w-sticky-sessions.yaml) (task state is node-local)
138+
- [Model-cache PVC/Job](https://github.com/docling-project/docling-serve/blob/v1.21.0/docs/models.md) (pre-baking weights)
139+
- KFP / Ray engines, OpenTelemetry, CUDA image-tagging policy → [serve repo](https://github.com/docling-project/docling-serve/tree/v1.21.0/docs)
140+
141+
Prefer not to run any of this yourself? See the [managed service](managed.md).

docs/usage/api_server/index.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!-- Source: docling-serve@v1.21.0 — keep in sync on serve releases that touch config/deployment/usage. -->
2+
!!! info "Synced from docling-serve v1.21.0"
3+
This page summarizes the [docling-serve](https://github.com/docling-project/docling-serve) documentation at **v1.21.0**. For the exhaustive reference, follow the links to the source repository.
4+
5+
# API server
6+
7+
Run Docling as an HTTP service with [docling-serve](https://github.com/docling-project/docling-serve) — a FastAPI server that exposes Docling's document conversion over a REST API.
8+
9+
## When to use what?
10+
11+
| You want to… | Use |
12+
|---|---|
13+
| Call Docling over HTTP from any language (including Python), or share one conversion service | the **API server**[self-host](deployment.md) it, or use a [managed service](managed.md) |
14+
| Run Docling directly (in-process) in a Python application | the [Python library](../../getting_started/quickstart.md) |
15+
| Run large-scale or distributed batch conversions | [Jobkit](../jobkit.md) |
16+
| Expose Docling as tools to an AI agent | the [MCP server](../mcp.md) |
17+
18+
!!! note "Using the API server from an MCP agent"
19+
The [MCP server](../mcp.md) can convert through this REST API instead of running Docling locally — set `DOCLING_CONVERSION_MODE=remote` and point it at your service URL. See [MCP server](../mcp.md).
20+
21+
## Getting started
22+
23+
To use the API server you need a running endpoint — [run your own](deployment.md) or use a [managed service](managed.md) — plus its **service URL** and, if the server requires one (`DOCLING_SERVE_API_KEY`), an **API key**. A local server defaults to `http://localhost:5001` (interactive API docs at `/docs`):
24+
25+
```sh
26+
curl -X POST "http://localhost:5001/v1/convert/source/async" \
27+
-H "Content-Type: application/json" \
28+
-d '{"http_sources": [{"url": "https://arxiv.org/pdf/2501.17887"}]}'
29+
```
30+
31+
See [Deployment](deployment.md) to run and configure it, and [REST API](rest_api.md) for the full API.
32+
33+
## How it works
34+
35+
A request hits the docling-serve API, which runs the conversion through Docling and returns the result (synchronously, or as an async task you poll). Background jobs run on a pluggable [compute engine](deployment.md#compute-engines) — in-process by default, or a Redis-backed queue for scaling. For the full API see [REST API](rest_api.md).

docs/usage/api_server/managed.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Why use the managed service
2+
3+
Running the API server yourself means operating infrastructure. A managed service removes that:
4+
5+
- **No infrastructure to run.** No servers, GPUs, scaling, upgrades, or operational monitoring — it is hosted and maintained for you.
6+
- **Simple integration.** It exposes the same [REST API](rest_api.md) as the self-hosted server, so wiring it into applications and AI agents is just an HTTP call — point your client at the managed endpoint and go. Client code stays portable: typically you only swap the base URL and supply your API key.
7+
- **Same Docling conversion.** The same document understanding and output formats as the open-source library and server.
8+
9+
## Available managed services
10+
11+
### Docling for IBM watsonx
12+
13+
A fully managed, hosted instance of the Docling service, exposing the same [REST API](rest_api.md) described in these pages. You provide the service URL and an API key, then call it like any other endpoint.
14+
15+
- [Product page](https://www.ibm.com/products/docling)
16+
<!-- - [Free trial](https://www.ibm.com/products/docling) — hidden for the moment -->

docs/usage/api_server/rest_api.md

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
<!-- Source: docling-serve@v1.21.0 — keep in sync on serve releases that touch config/deployment/usage. -->
2+
!!! info "Synced from docling-serve v1.21.0"
3+
This page summarizes the [docling-serve](https://github.com/docling-project/docling-serve) documentation at **v1.21.0**. For the exhaustive reference, follow the links to the source repository.
4+
5+
# REST API
6+
7+
The docling-serve HTTP API. Examples target a local server at `http://localhost:5001`; on **Docling for IBM watsonx** use your service base URL and key.
8+
9+
## Endpoints
10+
11+
| Endpoint | Method | Purpose |
12+
|---|---|---|
13+
| `/v1/convert/source` | POST | convert from URLs / base64 sources (sync) |
14+
| `/v1/convert/file` | POST | convert uploaded files, multipart (sync) |
15+
| `/v1/convert/source/async`, `/v1/convert/file/async` | POST | submit an async task |
16+
| `/v1/status/poll/{task_id}` | GET | poll task status |
17+
| `/v1/status/ws/{task_id}` | WebSocket | subscribe to status |
18+
| `/v1/result/{task_id}` | GET | fetch a finished result |
19+
20+
The full, interactive schema is always available at **`/docs`** (OpenAPI / Swagger) on any running server.
21+
22+
## Authentication
23+
24+
If `DOCLING_SERVE_API_KEY` is set on the server, send it on every request:
25+
26+
```sh
27+
-H "X-Api-Key: <YOUR_KEY>"
28+
```
29+
30+
## Python client
31+
32+
Docling ships a Python client for the API server, so you don't have to hand-roll HTTP calls. It takes the service URL and an optional API key, and returns the same `ConversionResult` as the local `DocumentConverter`:
33+
34+
```python
35+
from docling.service_client import DoclingServiceClient
36+
from docling.datamodel.service.options import ConvertDocumentsOptions
37+
38+
with DoclingServiceClient(url="http://localhost:5001") as client:
39+
result = client.convert(
40+
source="https://arxiv.org/pdf/2501.17887",
41+
options=ConvertDocumentsOptions(to_formats=["md"]),
42+
)
43+
44+
print(result.document.export_to_markdown())
45+
```
46+
47+
`source` accepts an HTTP/HTTPS URL string, a local `pathlib.Path`, or a `DocumentStream`; use `convert_all([...])` to stream multiple conversion results. The `options` are the same [conversion options](#conversion-options-common) shown below. See the [examples](../../examples/index.md) for more recipes.
48+
49+
## Conversion options (common)
50+
51+
Pass these in the JSON body under `options`. This is the common subset — the **authoritative, full schema is the live OpenAPI docs at `/docs`** on any running server.
52+
53+
| Option | Meaning |
54+
|---|---|
55+
| `from_formats` / `to_formats` | input / output formats (see [Supported formats](../supported_formats.md)) |
56+
| `image_export_mode` | how images are emitted (`placeholder` / `embedded` / `referenced`) |
57+
| `do_ocr` / `force_ocr` | enable / force OCR |
58+
| `ocr_preset` / `ocr_lang` | OCR preset and languages (`ocr_engine` is deprecated — prefer `ocr_preset`) |
59+
| `table_mode` | table-structure mode (`fast` / `accurate`) |
60+
| `pdf_backend` | PDF parsing backend |
61+
| `pipeline` | processing pipeline (e.g. standard / VLM) |
62+
| enrichment flags | code, formula, picture classification/description, chart |
63+
64+
For full-page VLM conversion models see [Vision models](../vision_models.md); for picture-description models see [Enrichment features](../enrichments.md#picture-description) and [Model catalog](../model_catalog.md).
65+
66+
## Example: convert a URL (async)
67+
68+
```sh
69+
curl -X POST "http://localhost:5001/v1/convert/source/async" \
70+
-H "Content-Type: application/json" \
71+
-d '{"http_sources": [{"url": "https://arxiv.org/pdf/2501.17887"}]}'
72+
```
73+
74+
For a synchronous call use `/v1/convert/source` with the same body.
75+
76+
## Example: upload a file (multipart)
77+
78+
The `/v1/convert/file` endpoint accepts one or more files as `multipart/form-data`, with options as form fields:
79+
80+
```sh
81+
curl -X POST "http://localhost:5001/v1/convert/file" \
82+
-H "Content-Type: multipart/form-data" \
83+
-F "files=@2206.01062v1.pdf;type=application/pdf" \
84+
-F "from_formats=pdf" \
85+
-F "to_formats=md" \
86+
-F "do_ocr=true" \
87+
-F "image_export_mode=embedded" \
88+
-F "table_mode=fast"
89+
```
90+
91+
## Base64 file upload
92+
93+
To send a file inline instead of multipart, POST to `/v1/convert/source` with `file_sources`. For large files, write the request body to a temp file and pass it with `-d @file` to avoid the shell's "Argument list too long" error:
94+
95+
```sh
96+
# 1. base64-encode the file
97+
B64_DATA=$(base64 -w 0 /path/to/document.pdf)
98+
99+
# 2. build the request body
100+
cat > /tmp/request_body.json <<EOF
101+
{
102+
"file_sources": [{ "base64_string": "${B64_DATA}", "filename": "document.pdf" }]
103+
}
104+
EOF
105+
106+
# 3. POST the request
107+
curl -X POST "http://localhost:5001/v1/convert/source" \
108+
-H "Content-Type: application/json" \
109+
-d @/tmp/request_body.json
110+
```
111+
112+
## Response format
113+
114+
A single-file conversion returns JSON:
115+
116+
```jsonc
117+
{
118+
"document": {
119+
"md_content": "",
120+
"json_content": {},
121+
"html_content": "",
122+
"text_content": "",
123+
"doctags_content": ""
124+
},
125+
"status": "success", // success | partial_success | skipped | failure
126+
"processing_time": 0.0,
127+
"timings": {},
128+
"errors": []
129+
}
130+
```
131+
132+
Only the `*_content` fields you requested via `to_formats` are populated. `processing_time` is in seconds; `timings` carries per-component detail when enabled. If you request the zip `target`, or the job produces multiple files, the response is a zip archive instead of JSON.
133+
134+
## Asynchronous API
135+
136+
Both convert endpoints have `/async` variants. Submitting returns a task descriptor:
137+
138+
```jsonc
139+
{
140+
"task_id": "<task_id>",
141+
"task_status": "pending", // pending | started | success | failure
142+
"task_position": 1,
143+
"task_meta": null
144+
}
145+
```
146+
147+
**Poll** until done — `GET /v1/status/poll/{task_id}`:
148+
149+
```python
150+
import time
151+
import httpx
152+
153+
base_url = "http://localhost:5001/v1"
154+
task = response.json() # from the /async submission
155+
156+
while task["task_status"] not in ("success", "failure"):
157+
task = httpx.get(f"{base_url}/status/poll/{task['task_id']}").json()
158+
time.sleep(5)
159+
```
160+
161+
**Subscribe** via WebSocket — `/v1/status/ws/{task_id}` — for push updates (messages are JSON with `message` = `connection | update | error` plus the task object).
162+
163+
**Fetch** the result when finished — `GET /v1/result/{task_id}`.
164+
165+
## Picture description
166+
167+
When picture-description (image captioning) enrichment is on, select the model with `picture_description_preset` (a named preset) or, for full control, `picture_description_custom_config`. The model can run locally (in-process) or via a remote OpenAI-compatible API endpoint; the remote path requires launching the server with `DOCLING_SERVE_ENABLE_REMOTE_SERVICES=true`.
168+
169+
!!! note
170+
The older `picture_description_local` / `picture_description_api` parameters are deprecated at docling-serve v1.21.0 — migrate to `picture_description_preset` / `picture_description_custom_config`.
171+
172+
See [Enrichment features](../enrichments.md#picture-description) for picture-description options, and [Model catalog](../model_catalog.md) for available models.

0 commit comments

Comments
 (0)