Skip to main content

Quickstart

Convert a local file

convertFile receives a route and uses Bun.file(path) internally to stream the content directly to the request body — PDF is never loaded in its entirety in Buffer JS.

Convert bytes already loaded into memory

If you already have PDF as Uint8Array/ArrayBuffer (for example, received in Request), use convertBytes:

Convert from URL

Request metadata in addition to Markdown

With responseFormat: "json" the SDK returns a typed ConversionResult object instead of string. See Reference.

Siguiente paso