DocumentationAPI Reference

Core

Convert

POST /v1/convert/{name} inputs, options, wait behaviour, the response envelope, and the full name catalog.

Request

POSThttps://api.markitdown.ai/v1/convert/pdfConvert an uploaded PDF — every name below follows the same request/response shape
Body — send exactly one input kind
filemultipartRaw file bytes (up to 100 MB).
filesmultipart[]Several files of the same name.
url / urlsstringPublic http(s) page(s) — url/url name only.
text / textsstringInline content — html, text, and markdown/* names only.
file / filesstringA file_… id from an earlier conversion's source or output.
upload / uploadsstringAn upl_… id from a completed POST /v1/uploads (for a file over the multipart size limit).
Options (top-level body fields, or multipart form fields)
formatsstring[]Any of markdown (always produced), text, html, pages.
pagesstring1-based page range, e.g. 1-5,8. Only those pages are parsed and charged (pdf, word, powerpoint).
qualitystringfast, standard, or max — the processing route.
ocrbooleanForce OCR on a PDF.
table_modestringfast or accurate table extraction.
image_modestringimage name only: ocr (default) or understand (AI image understanding).
figuresstringplaceholder (default) or describe (AI figure captions).
linksstringmarkdown/text only: text-url (default) or text.
renderstringurl only: auto (default) renders the page in a headless browser when the fetched HTML has no readable content, force always renders, skip never renders.
frontmatterbooleanurl only: prepend YAML front matter with the source URL, canonical URL, title, and — when the page declares them — author, publish date, description, site name, language, and lead image.
storebooleanKeep the result in your library. Default false: results are deleted after 24 hours.
metadataobjectYour own key/value data, echoed back on the conversion.

Waiting and 202 responses

Each call waits up to 60 seconds for every source file to finish. Change that with Prefer: wait=N or ?wait=N (at most 100); Prefer: respond-async returns 202 at once.

async_reason on a 202
wait_timeoutreasonAt least one source file was still running when the wait window ended.
too_many_sourcesreasonMore than 10 source files in one submission; queued without waiting.
pages_exceed_sync_limitreasonA source needs more than 30 OCR pages (scanned PDFs, images) or 300 text pages; queued without waiting.
capacityreasonThe interactive queue is busy; the conversion runs in the background.
respond_asyncreasonYou asked for an immediate 202.

Response envelope

  • id (cnv_…), object (conversion), name, status (queued, running, completed, completed_with_errors, failed), async_reason, created_at, completed_at.

  • summary — sources, queued, running, completed, failed counts, read live from the underlying work.

  • files — up to 100 source files (files_next_cursor pages the rest), each id (file_…), status, pages, credits, error, and an outputs[] array. outputs[].content is the Markdown/text/HTML inlined when it is at most 256 KB; larger outputs and pages output are fetched from GET …/files/{file_id}/content.

  • usage — credits_charged, credits_reserved while running, and credits_remaining.

  • metadata, links (self, files, events).

The name catalog

How are conversion credits charged?

Standard pages and OCR pages cost 1 credit per page. Credits are reserved per source file when it starts and settled from the pages actually parsed, so pages lowers the cost of a long document. A failed file is not charged. If your balance cannot cover the reservation for every source in the request, the whole call returns 402 insufficient_credits; a file above your plan's page cap returns 422 page_cap_exceeded before anything runs. Rendering (markdown/html, markdown/text) is always 0 credits.

How many conversions can run at once?

Waiting calls are limited per account: Lite 3, Pro 5, and Max 8 at a time. Another call beyond that returns 429 concurrency_limited; retry after one finishes, or send Prefer: respond-async and poll. There is no separate limit on background (non-waiting) work — put many files in one request instead of many parallel calls.

On this page