Multi-Language API Integration#
Docling's core processing engine is Python-only, but it exposes document conversion capabilities to every other language ecosystem through Docling Serve — a FastAPI service that listens on port 5001 . There are four integration paths:
| Path | Status | Best for |
|---|---|---|
HTTP REST (/v1/...) | Stable (v1 API) | Any language via HTTP client |
Java client library (docling-java) | Stable, published to Maven Central | Java, Quarkus, Spring Boot |
| Node.js via Bee Agent Framework | Available on NPM | JavaScript/TypeScript AI agents |
| gRPC (PR #504) | Experimental, not yet merged | Polyglot streaming use cases |
The shared wire format across all paths is the DoclingDocument JSON schema .
HTTP REST API#
The REST API is the primary integration point for any language. Key endpoints :
| Endpoint | Method | Description |
|---|---|---|
/v1/convert/source | POST | Synchronous conversion from URL(s) or base64 files |
/v1/convert/file | POST | Synchronous conversion from multipart file upload |
/v1/convert/source/async | POST | Async conversion — returns task_id immediately |
/v1/status/poll/{task_id} | GET | Poll async task status |
/v1/status/ws/{task_id} | WebSocket | Real-time task status updates |
/v1/result/{task_id} | GET | Retrieve completed task result |
A minimal call from any language reduces to a POST with a JSON body :
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"}]}'
The response contains md_content, json_content, html_content, etc., controlled by to_formats in the request options . Interactive API docs are at http://localhost:5001/docs .
When API key authentication is enabled, all requests must include the X-Api-Key header .
Java Integration (docling-java)#
docling-java provides two layers of Java API :
docling-core(ai.docling:docling-core) — Jackson-annotated Java model mirroring theDoclingDocumentJSON schemadocling-serve-api(ai.docling:docling-serve-api) — framework-agnostic interface (DoclingServeApi) and request/response modelsdocling-serve-client(ai.docling:docling-serve-client) — reference implementation using Java's built-inHttpClientand Jackson; resolves between Jackson 2/3 at runtime via SPIdocling-testcontainers(ai.docling:docling-testcontainers) — official Testcontainers module for spinning up Docling Serve in JUnit tests
Quick start — see README for a full example using DoclingServeApi.builder(), ConvertDocumentRequest, and InBodyConvertDocumentResponse.
All artifacts are published to Maven Central and tested weekly against all published Docling Serve versions .
Framework integrations — the standalone client targets plain Java. For framework-managed contexts, use dedicated extensions :
| Framework | Integration |
|---|---|
| Quarkus | Quarkus Docling extension |
| Spring Boot | Arconia |
Full Java client documentation: docling-project.github.io/docling-java.
Node.js / JavaScript: Bee Agent Framework#
Docling is available as a document extraction backend in the Bee Agent Framework — an open-source AI agent framework from IBM .
- NPM package:
bee-agent-framework - Docs: i-am-bee.github.io/bee-agent-framework
This integration allows Node.js/TypeScript agents to call Docling's document extraction capabilities without writing a REST client from scratch. The Bee framework handles the HTTP communication with a running Docling Serve instance.
Experimental gRPC Bindings#
Status: Not merged. PR #504 ("feat: Grpc native converter") has been open since February 2026, with active discussion as of July 2026. Do not use in production.
A community contributor has proposed a gRPC transport layer for Docling Serve in two companion PRs :
docling-servePR #504 — gRPC server implementation, Python generated stubsdocling-corePR #546 — core protobuf definitions
Design#
The approach is semantic parity, not a strict REST-to-gRPC endpoint mirror . Key properties:
- Pydantic-first: the Pydantic domain model remains the source of truth; protobuf is the transport contract
- Startup schema validation: the gRPC server cross-checks protobuf descriptors against the live Pydantic model at startup, failing fast on type drift
- Three proto namespaces under
ai/docling/serve/v1/:docling_serve.proto,docling_serve_stream.proto,docling_serve_types.proto
Polyglot client examples#
The author provides working client examples in Go, Java, Python, JavaScript, and Rust at ai-pipestream/docling-grpc-examples .
Planned: server-side streaming#
The proposed streaming extension would emit document parts incrementally (text blocks, tables, pictures) as they complete parsing, rather than returning the full DoclingDocument at the end. A draft streaming protobuf schema (StreamDocumentRequest / DocumentStreamEnvelope) has been shared in the discussion thread .
Infrastructure note: pure server-streaming gRPC requires stable HTTP/2 connections. In environments that scale down replicas mid-request (e.g., Azure Container Apps GPU scaling), a long-lived gRPC stream can be severed — the same constraint that affects WebSocket-based async polling .