> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parserouter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From API key to your first parsed document in under five minutes.

This guide takes you from zero to a parsed document in three steps.

<Steps>
  <Step title="Create an API key">
    Sign in to your [dashboard](https://platform.parserouter.com/dashboard), open the **API Keys** page, or click on "Get API Key", and create a new key. It's shown **once** at creation, so copy it somewhere safe.

    All keys start with `sk-pr-` and authenticate via a bearer token:

    ```text theme={null}
    Authorization: Bearer sk-pr-...
    ```

    <Warning>
      Treat your API key like a password. Don't commit it to source control or expose it in client-side code – call ParseRouter from your backend.
    </Warning>
  </Step>

  <Step title="Make sure you have credits">
    Parsing costs **1 credit per page**, and you're only charged for documents that parse successfully. Check your balance on the dashboard and top up from the [Billing](https://platform.parserouter.com/billing) page if needed.
  </Step>

  <Step title="Parse your first document">
    Send a document as multipart form data. The only required field is `file`.

    <CodeGroup>
      ```bash cURL theme={null}
      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"
      ```

      ```python Python theme={null}
      import requests

      resp = requests.post(
          "https://api.parserouter.com/v1/mineru/parse",
          headers={"Authorization": "Bearer sk-pr-..."},
          files={"file": open("invoice.pdf", "rb")},
          data={"model": "mineru2.5-pro-2605"},
          timeout=600,  # large documents can take minutes
      )
      resp.raise_for_status()
      print(resp.json()["markdown"])
      ```

      ```javascript JavaScript theme={null}
      const form = new FormData();
      form.append("file", file); // a File or Blob
      form.append("model", "mineru2.5-pro-2605");

      const resp = await fetch("https://api.parserouter.com/v1/mineru/parse", {
        method: "POST",
        headers: { Authorization: "Bearer sk-pr-..." },
        // Don't set Content-Type – the browser adds the multipart boundary.
        body: form,
      });
      const data = await resp.json();
      console.log(data.markdown);
      ```
    </CodeGroup>
  </Step>
</Steps>

## The response

A successful parse returns the page count, the full document as Markdown, and a flat list of structured content blocks in reading order:

```json theme={null}
{
  "page_count": 1,
  "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>",
  "content_list": [
    { "type": "text", "text": "Invoice #2041", "text_level": 1, "page_idx": 0 },
    {
      "type": "table",
      "table_body": "<table><tr><td>Item</td><td>Qty</td><td>Price</td></tr>...</table>",
      "page_idx": 0
    }
  ]
}
```

Use `markdown` when you want the whole document as text (for example, to feed an LLM), or `content_list` when you need structure, block types, and reading order.

<Note>
  **Large documents take time.** Pages are parsed by the model, so a multi-page document can take from seconds to a few minutes. Set a generous client timeout (the examples above use 600s). Documents are capped at **50 pages** each.
</Note>

## What's next

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/parse">
    Every parameter and the full response schema.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/errors">
    The status codes ParseRouter returns and how to handle them.
  </Card>
</CardGroup>
