Skip to main content
POST
/
v1
/
mineru
/
parse
curl -X POST https://api.parserouter.com/v1/mineru/parse \
  -H "Authorization: Bearer sk-pr-..." \
  -F "file=@invoice.pdf" \
  -F "model=mineru2.5-pro-2605" \
  -F "title_levels=true" \
  -F "extract_images=true" \
  -F "image_analysis=true"
{
  "markdown": "# Invoice #2041\n\n<table><tr><td>Item</td><td>Qty</td><td>Price</td></tr><tr><td>API credits</td><td>10,000</td><td>$99.00</td></tr></table>",
  "page_count": 1,
  "content_list": [
    {
      "type": "text",
      "text": "Invoice #2041",
      "text_level": 1,
      "page_idx": 0,
      "bbox": [80, 60, 420, 110]
    },
    {
      "type": "table",
      "table_body": "<table><tr><td>Item</td><td>Qty</td><td>Price</td></tr><tr><td>API credits</td><td>10,000</td><td>$99.00</td></tr></table>",
      "img_path": "https://storage.googleapis.com/parserouter/.../table_0.jpg",
      "page_idx": 0,
      "bbox": [80, 200, 920, 480]
    }
  ]
}
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

Authorization
string
required
Your API key as a bearer token: Bearer sk-pr-....

Request

Send the document as multipart/form-data.
file
file
required
The document to parse. Must be a PDF or image (.pdf, .png, .jpg, .jpeg), up to 50 pages.
model
string
default:"mineru2.5-pro-2605"
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.
title_levels
boolean
default:"true"
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.
extract_images
boolean
default:"true"
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.
image_analysis
boolean
default:"true"
Generate a short text description of each image and chart block, returned as content. Adds extra processing per visual block.

Response

markdown
string
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.
page_count
integer
The number of pages parsed. 1 for an image.
content_list
object[]
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.
curl -X POST https://api.parserouter.com/v1/mineru/parse \
  -H "Authorization: Bearer sk-pr-..." \
  -F "file=@invoice.pdf" \
  -F "model=mineru2.5-pro-2605" \
  -F "title_levels=true" \
  -F "extract_images=true" \
  -F "image_analysis=true"
{
  "markdown": "# Invoice #2041\n\n<table><tr><td>Item</td><td>Qty</td><td>Price</td></tr><tr><td>API credits</td><td>10,000</td><td>$99.00</td></tr></table>",
  "page_count": 1,
  "content_list": [
    {
      "type": "text",
      "text": "Invoice #2041",
      "text_level": 1,
      "page_idx": 0,
      "bbox": [80, 60, 420, 110]
    },
    {
      "type": "table",
      "table_body": "<table><tr><td>Item</td><td>Qty</td><td>Price</td></tr><tr><td>API credits</td><td>10,000</td><td>$99.00</td></tr></table>",
      "img_path": "https://storage.googleapis.com/parserouter/.../table_0.jpg",
      "page_idx": 0,
      "bbox": [80, 200, 920, 480]
    }
  ]
}

Errors

ParseRouter uses standard HTTP status codes. Error responses have the shape { "detail": "..." }.
StatusMeaningWhat to do
400The file is not a valid PDF or image.Check the file is one of the supported formats and not corrupted.
401Missing or invalid API key.Send a valid Authorization: Bearer sk-pr-... header.
402Insufficient credits.Top up your balance on the Billing page.
413The document exceeds 50 pages.Split the document into smaller files.
429Rate limit exceeded.Back off and retry after the Retry-After header (seconds).
503The 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.