Skip to main content
POST
Convert to Markdown

Headers

X-API-Key
string

Body

multipart/form-data
file
file | null

File to convert

url
string | null

URL to convert

url_headers
string | null

JSON-encoded headers for URL auth

use_llm
boolean
default:false

Use LLM for image descriptions (costs tokens)

structure
boolean
default:false

Also return the document's structure: pages for a PDF (a scanned page transcribed in its place) or a presentation's slides, sheets for a workbook. For callers that cite locations.

ocr
boolean
default:true

Transcribe image-only pages and picture-only documents (one vision call per page). A caller whose plan does not cover transcription turns it off; the text layer is read either way.

ocr_max_pages
integer
default:0

With structure=true: the most pages to transcribe (the caller's plan limit); 0 is the default cap

Required range: 0 <= x <= 1000
filename
string | null

The file's name, for a URL that does not carry it (a signed blob URL, a pre-authenticated download link): its extension picks the converter. Giving it also says the URL is a FILE, not a website, so a refused fetch (401/403) is reported as one instead of rendered in a browser.

Response

Successful Response

Response for markdown conversion.

markdown
string
required

Converted markdown content

filename
string
required

Original filename or URL

content_length
integer
required

Length of the markdown output in characters

success
boolean
default:true
content_type
string | null

Detected MIME type

pages
PageText · object[] | null

With structure=true: a PDF's pages or a deck's slides

sheets
SheetText · object[] | null

With structure=true: a workbook's sheets

scanned_pages
integer[] | null

With structure=true, for a PDF: the pages that are images of text (reported even with ocr=false)

transcribed_pages
integer[] | null

With structure=true, for a PDF: the pages whose text is a transcription of the image