---
title: "Preview a single PDF page (Base64)"
method: POST
path: "/api/preview/base64"
tags: ["Preview"]
---

# Preview a single PDF page (Base64)

`POST /api/preview/base64`

## Request

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

Submit a Base64-encoded PDF and get a single page rendered as binary image.

## Query parameters

- `page` integer
- `format` string
- `dpi` integer
- `maxWidth` integer

## Request body

- object

## Response `200`

Page preview image

## Other responses

- `400`: Invalid PDF or page number

---

[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)
