Convert a document to Markdown with Docling
convert_documentConvert a document up to 25 MB and 200 pages to Markdown with Docling: OCR, tables, headings and reading order.
Pass the file as base64 in content_base64, or as a download link in
file, and its name in filename. Returns task_id and task_status.
Call get_conversion with the task_id until task_status is success
or failure; a long PDF can take several minutes.
Costs 1 credit per PDF page converted (2 with force_ocr) and 10 credits
per other file, refunded if the conversion fails. Requires an API key.
The file is deleted when the conversion ends; the result is kept for
7 days.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | The file as a download link, instead of `content_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL. | |
| filename | Yes | The file name with its extension, such as report.pdf. Docling reads PDF, Word, PowerPoint, Excel, HTML, Markdown, CSV and images. | |
| force_ocr | No | Replace a PDF's text layer with OCR text. Doubles the price of a PDF. | |
| page_range | No | Optional. [first, last] pages to convert, 1-based. | |
| content_base64 | No | The file content, base64-encoded. Up to 25 MB before encoding. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||