DoclingDocling for IBM watsonx
API Reference

Overview

Complete API reference for Docling for IBM watsonx

API Reference

The Docling for IBM watsonx API provides a RESTful interface for converting documents into AI-ready formats.

Every HTTP request you make to the API endpoints require a Service URL and an API key. Access these by following the Quick Start guide.

The Service URL will look similar to:

https://api.example.dcls.saas.ibm.com/your-instance-id

Use this complete URL as your base URL for all API requests.

To use the API key, pass it in the X-Api-Key header of all API requests:

curl -H "X-Api-Key: your-api-key" \
  {SERVICE_URL}/v1/...

See the Basic Conversion examples for more guidance on how to use the Service URL and the API key.

API Workflow

Docling uses an asynchronous workflow for document conversion:

  1. Submit - Upload or specify document source
  2. Poll - Check conversion status
  3. Retrieve - Get result artifacts, download URLs, and per-document statuses for the converted output

Endpoints

Conversion

Status & Results

Rate Limits

Rate limits depend on your plan. If you exceed a limit, the API returns 429 Too Many Requests — back off and retry (see Polling Best Practices).

LimitDefault
Maximum file size500MB
Maximum documents per batch requestLimited only on trial (50 documents)

Contact your account manager for your plan's specific limits.

Error Handling

The API uses standard HTTP status codes. 2xx indicates success, 4xx a problem with the request, and 5xx a service-side error.

StatusMeaning
200Success
202Accepted — conversion task created
400Bad request (malformed request or invalid parameters)
401Unauthorized (missing or invalid API key)
404Not found (unknown task ID or endpoint)
422Validation error (invalid request shape, URL syntax, or unsupported target)
429Too many requests (rate limit exceeded)
500Internal server error
502Gateway or upstream error

Error responses include an error code and a human-readable message, and may include a details object. For example, an authentication failure:

{
  "error": "token_exchange_failed",
  "message": "API key authentication failed",
  "details": {
    "instanceId": "...",
    "upstreamStatus": 400
  }
}

Calling an unknown endpoint returns the list of supported endpoints:

{
  "error": "Request failed",
  "message": "Endpoint /v1/convert/source is not supported. Supported: /v1/convert/file/async, /v1/convert/source/async, /health, /v1/result, /v1/status/poll"
}

When you receive a 429, retry with exponential backoff — see Polling Best Practices.

Supported Formats

Input Formats

  • PDF documents
  • Images (PNG, JPEG, TIFF)
  • Microsoft Office (Word, Excel, PowerPoint)
  • And more...

Output Formats

  • Markdown - Human-readable text
  • JSON - Structured data
  • HTML - Web-ready format

Next Steps

On this page