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
| Method | Use when | Sources | Results |
|---|---|---|---|
Single conversion (convert/source, convert/file) | Converting one document | One web URL or one uploaded file | Download link |
Batch conversion (convert/source/batch) | Converting more than one document, or ingesting from cloud storage | Web 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
- Basic Conversion: Get started by converting a single document
- Converting Multiple Documents: Convert more than one document in a single request
- Batch Conversion: Ingest large collections from cloud storage at scale
- Custom Conversion: Customize the conversion process to meet your specific needs
- Specific Extraction: Extract targeted content from your documents