DoclingDocling for IBM watsonx
This is a preview with content being developed and subject to changes. Rely on theofficial announcement and documentationabout the Docling for IBM watsonx product.
API Reference

Convert Source

Convert documents from URLs using the Docling for IBM watsonx API

Convert Source

Convert documents from remote URLs (HTTP/HTTPS) into AI-ready formats.

Endpoint

POST /v1/convert/source/async

Request Headers

HeaderRequiredDescription
X-Api-KeyYesYour API key for authentication
Content-TypeYesMust be application/json

Request Body

The request body must be a JSON object with the following structure:

ParameterTypeRequiredDescription
sourcesarrayYesArray of source objects to convert
optionsobjectConditionalConversion options (see Options)

Source Object

Each source object in the sources array must contain:

ParameterTypeRequiredDescription
kindstringYesMust be "http" for URL sources
urlstringYesThe URL of the document to convert

Options

options is required if you are uploading multiple documents. The options object supports the following parameters:

ParameterTypeDefaultDescription
output_formatstring"json"Output format: "json", "markdown", or "html"

Response

Success Response (20X Accepted)

Returns a task object that can be used to poll for completion:

{
  "task_id": "{TASK_ID}",
  "task_type": "convert",
  "task_status": "pending",
  "task_position": 1,
  "task_meta": null,
  "error_message": null
}
FieldTypeDescription
task_idstringUnique identifier for this conversion task (generated by the service)
task_typestringAlways "convert" for conversion tasks
task_statusstringCurrent status: "pending", "processing", "success", or "failure"
task_positionintegerPosition in queue (null when processing or complete)
task_metaobjectAdditional metadata (currently unused)
error_messagestringError description if status is "failure"

Error Responses

To be added.

Examples

Find examples of using the Source Conversion endpoint in the Examples section.

Next Steps

After submitting a conversion request:

  1. Poll for status - Use the /v1/status/poll/{task_id} endpoint to check conversion progress
  2. Retrieve results - Once status is "success", use the /v1/result/{task_id} endpoint to get the converted document

Rate Limits

To be added.

Best Practices

  1. Use appropriate output formats - Choose markdown for RAG applications, json for structured data extraction
  2. Enable low-latency mode - For real-time applications where speed is critical
  3. Batch similar documents - Process multiple documents together for efficiency
  4. Handle errors gracefully - Always check the task_status and error_message fields
  5. Implement retry logic - Use exponential backoff for transient failures

Common Errors

To be added.

On this page