PDF to markdown
via POST /parse
POST a PDF to /parse with your ocr_model. The response includes a markdown string and typed layout blocks with headings, tables, and figures where the engine detects them.
POST /parse returns markdown and blocks
Call /parse sync, async, or batch. The response includes a markdown string and typed layout blocks.
/parserequestcurl https://api.openparser.dev/parse \
-H "Authorization: Bearer op_live_…" \
-H "Idempotency-Key: $(uuidgen)" \
-F 'request={"ocr_model":"paddleocr-vl-1.6","output_format":"openparser@1"};type=application/json' \
-F "file=@statement.pdf"{
"output_format": "openparser@1",
"document_id": "doc_3f9a2c",
"page_count": 1,
"markdown": "## Payment Authorization\n| Item | Amount |\n| --- | --- |\n| Total | $4,318.20 |",
"blocks": [
{
"index": 0,
"page_number": 1,
"kind": "text",
"text": "## Payment Authorization"
},
{
"index": 1,
"page_number": 1,
"kind": "table",
"table_html": "<table><tr><th>Item</th><th>Amount</th></tr><tr><td>Total</td><td>$4,318.20</td></tr></table>",
"bbox": {
"left": 14,
"top": 53,
"right": 146,
"bottom": 123
},
"confidence": 0.98
}
],
"regions": [],
"contents": [],
"chunks": []
}Preview markdown in the playground
Upload a PDF, inspect the markdown field and block kinds, then create an API key for POST /parse.
{ total: "$4,318.20" } b4Markdown for storage, blocks for inspection
The markdown field is ready for chunking and retrieval. blocks[] carries kinds, bounding boxes, and confidence per region.
Markdown and typed blocks
Both return in the same /parse response. Use markdown for storage and retrieval. Use blocks when you need per-region types or confidence.
Route low-confidence pages
Blocks can include OCR confidence scores. Send low-confidence results to review before they enter a retrieval index.
Headings, tables, figures
When the parser recognizes them, headings and tables survive in markdown and as typed blocks. Figures keep their own block type.
Extract after parse
Run /extract on the parse result to fill a JSON schema. Citations point back to block indexes and source-page bounding boxes.
Stable block indexes
Each block carries a stable index you can attach to vector metadata or hand to an agent tool call.
Batch document intake
POST multiple PDFs to /parse/batch and poll /jobs/{id} when you ingest folders on a schedule.
Page rates depend on ocr_model
New accounts get $10 in credits at signup (about 10,000 pages at $1/1,000 on open-weight hosted models). Other engines publish page rates on GET /models/ocr.
- No minimums
- No per-seat fees
- Sync, async, and batch
- Console and API keys
PDF to markdown API FAQ
/parse response fields, ocr_model pricing, and hosted inference.
What does the PDF to markdown API return?
The /parse endpoint returns a markdown string plus normalized typed layout blocks. Blocks can include text, headings, tables, figures, bounding boxes, and confidence values.
Do I get markdown only, or blocks too?
Both return in the same response. Use markdown for storage and retrieval. Use blocks when you need per-region types, bounding boxes, or confidence scores.
Which parser runs behind the API?
OpenParser hosts nine OCR models. Set ocr_model on each /parse request. paddleocr-vl-1.6 is the default open-weight hosted option at $1 per 1,000 pages; Mistral, Azure, Google, and AWS Textract are also available.
How much does parsing cost?
New accounts get $10 in credits at signup (about 10,000 pages at $1/1,000). After that, parsing costs $1 per 1,000 pages.
Can I parse PDFs asynchronously?
Yes. The API supports synchronous, asynchronous, and batch parsing, plus job endpoints for checking status and retrieving results.
Does OpenParser run on my infrastructure?
No. OpenParser hosts the OCR engines. You send files to POST /parse; OpenParser runs inference and returns markdown plus typed blocks.
Preview markdown in Studio, then call POST /parse
Upload a PDF, inspect the markdown field and block kinds, create an API key, and call /parse from your backend with ocr_model set.