---
title: "Render (template optional)"
method: POST
path: "/v1/render"
tags: ["Render"]
---

# Render (template optional)

`POST /v1/render`

## Request

- Base URL: `https://api.quirepdf.dev`
- URL: `https://api.quirepdf.dev/v1/render`
- Auth: HTTP bearer

Template resolution:
1. `?template=name`: use that template (strict validation).
2. Otherwise the most specific gallery template whose schema the data satisfies.
3. Otherwise the generic `document` layout: header from `title`/`from`/`to` (or inferred from an
   `*_id` key), a details panel for short fields, one section per remaining key
   (objects → key/value grids, arrays of objects → tables).
If a template almost matched (≤ 2 problems), `x-template-hint` says what's missing.

## Query parameters

- `template` string
- `format` 'pdf' | 'png'
- `page` integer
- `test` boolean

## Request body

- object

## Response `200`

Rendered document

## Other responses

- `400`: Error
- `401`: Error
- `404`: Error
- `413`: Error
- `422`: Error
- `429`: Error
- `504`: Error

---

[API](https://skmtc.dev/quirepdf/apis/quire-api.md) · [All operations](https://skmtc.dev/quirepdf/apis/quire-api/llms.txt) · [OpenAPI document](https://skmtc.dev/quirepdf/apis/quire-api/revisions/47b98388c395?raw)
