DoclingDocling for IBM watsonx
Examples

Overview

Use cases for Docling for IBM watsonx

Docling for IBM watsonx provides Docling's ability to convert documents by delegating the processing resources necessary on an external server.

To use Docling for watsonx, there are primarily two ways to convert a document:

  • Making HTTP requests to API endpoints
  • Using the Python SDK (recommended)

Setup

Regardless of which method you decide on, you must have a Service URL and an API key, personal to your Docling for IBM watsonx account. Please refer to the Quick Start guide for guidance on how to access these.

All examples will refer to these placeholders:

  • {DOCLING_SERVICE_URL} - Your Service URL from the Docling for IBM watsonx client.
  • {DOCLING_API_KEY} - Your API key from the Docling for IBM watsonx client.
  • {TASK_ID} - The task ID returned from conversion requests (API endpoint only).

Store your credentials securely using environment variables:

export DOCLING_SERVICE_URL="${DOCLING_SERVICE_URL}"
export DOCLING_API_KEY="${DOCLING_API_KEY}"

Choosing a conversion method

MethodUse whenSourcesResults
Single conversion (convert/source, convert/file)Converting one documentOne web URL or one uploaded fileDownload link
Batch conversion (convert/source/batch)Converting more than one document, or ingesting from cloud storageWeb URLs, cloud storage (S3)Download links, or a cloud storage location you specify

In short: use single conversion for one document, and the batch endpoint for everything else — even just a handful of documents.

Available Examples

On this page