Skip to main content

Quickstart

Convert a local file

convert_file uploads the document, waits for the response and returns the Markdown as str. Detects the input format by the file extension unless you pass input_format.

Convert from URL

Asynchronous client

Use AsyncClient if you already run in an event loop (FastAPI, aiohttp, etc.) so as not to block the thread while waiting for the response.

Request metadata in addition to Markdown

With response_format="json" the SDK returns a typed ConversionResult object instead of a str. See Reference for all fields.

Siguiente paso