API Reference
Parse a document
Convert a PDF or image into Markdown plus structured, reading-order content blocks.
POST
Upload a document and receive it as a single Markdown string plus a flat list of content blocks in reading order. Accepts a single PDF or image (
.pdf, .png, .jpg, .jpeg). PDFs are parsed page by page; an image is treated as a single page.
Authentication
Your API key as a bearer token:
Bearer sk-pr-....Request
Send the document asmultipart/form-data.
The document to parse. Must be a PDF or image (
.pdf, .png, .jpg, .jpeg), up to 50 pages.The parsing model to use.
mineru2.5-pro-2605 is currently the only option and is used by default if omitted.Models are versioned and never change behavior once released. For production, we recommend pinning this explicitly so a future default model never alters your results without you opting in.Detect heading levels. When enabled, title blocks carry a
text_level (1–4) and headings render with matching # depth in markdown. When disabled, titles are returned flat.Crop images, tables, and charts to hosted storage and return their URLs as
img_path on the relevant blocks (and as image links in markdown). When disabled, those blocks carry no URL.Generate a short text description of each image and chart block, returned as
content. Adds extra processing per visual block.Response
The whole document rendered as a single Markdown string – headings (with levels when
title_levels is enabled), tables and equations inline, and image links to the uploaded URLs when extract_images is enabled.The number of pages parsed.
1 for an image.A flat list of content blocks in reading order across the whole document (this mirrors MinerU’s
content_list). Blocks are heterogeneous – which fields are present depends on type. Unlisted fields (e.g. captions and footnotes) may also appear and are passed through as-is.Errors
ParseRouter uses standard HTTP status codes. Error responses have the shape{ "detail": "..." }.
| Status | Meaning | What to do |
|---|---|---|
400 | The file is not a valid PDF or image. | Check the file is one of the supported formats and not corrupted. |
401 | Missing or invalid API key. | Send a valid Authorization: Bearer sk-pr-... header. |
402 | Insufficient credits. | Top up your balance on the Billing page. |
413 | The document exceeds 50 pages. | Split the document into smaller files. |
429 | Rate limit exceeded. | Back off and retry after the Retry-After header (seconds). |
503 | The parsing backend is temporarily overloaded. | Retry after the Retry-After header. No charge is made. |
You’re only charged for successful parses (
200). Failed requests – including 400, 413, and 503 – never consume credits.