---
title: "Preview multiple PDF pages (file upload)"
method: POST
path: "/api/preview/pages"
tags: ["Preview"]
---

# Preview multiple PDF pages (file upload)

`POST /api/preview/pages`

## Request

- Base URL: `https://api.dokmatiq.com`
- URL: `https://api.dokmatiq.com/api/preview/pages`
- Auth: API key in header `X-API-Key`

Upload a PDF and get multiple pages as Base64-encoded images in a JSON response. Specify pages as: 'all', '1', '1-3', '1,3,5', or '1-3,7'. Maximum 50 pages per request.

## Query parameters

- `pages` string
- `format` string
- `dpi` integer
- `maxWidth` integer

## Response `200`

Multi-page preview

## Other responses

- `400`: Invalid PDF or page specification

---

[API](https://skmtc.dev/dokmatiq/apis/docgen-api.md) · [All operations](https://skmtc.dev/dokmatiq/apis/docgen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dokmatiq/apis/docgen-api/revisions/3fa1a922764d?raw)
