TL;DR
Cardinal can convert PDFs and images into clean, structured Markdown using this endpoint.- Tables are returned as HTML for accuracy.
- Add
markdown: true
to convert tables to Markdown viamarkdownify
.- ⚠️ Markdown tables may lose fidelity (e.g. merged cells, nested tables).
- Annotations
- Checkmarks
- Spanning tables (row/column merges)
- Complex tables (multi-level, nested)
- And more.
Endpoint
POSThttps://api.trycardinal.ai/markdown
Content-Type:
multipart/form-data
Auth:
Authorization: Bearer <API_KEY>
You may provide eitherfile
orfileUrl
.
Pagination
Large documents are processed in pages of up to 100 to prevent oversized responses.Each API call returns a batch of up to 100 pages, along with a
pagination
object in the response.
Pagination Fields
start_page
— First page returned in this batchend_page
— Last page returned in this batchpage_limit
— Maximum number of pages per batch (default: 100)has_more_pages
— Whether additional pages remainnext_start_page
— Use this value to request the next batch
Example Usage
You can paginate sequentially or in parallel:-
Sequential flow:
- Call
/markdown
with no pagination params → returns pages 1–100. - Check
has_more_pages: true
→ usenext_start_page: 101
. - Call
/markdown
again withstartPage=101
→ fetches the next batch.
- Call
-
Parallel flow:
You can launch multiple requests at once usingstartPage
offsets (e.g., 1, 101, 201, …) to fetch batches concurrently.