---
title: "Render an HTML document to PDF — 5 units (external subresources blocked; inline assets as data: URIs)"
method: POST
path: "/v1/pdf/html"
---

# Render an HTML document to PDF — 5 units (external subresources blocked; inline assets as data: URIs)

`POST /v1/pdf/html`

## Request

- Base URL: `https://api.preteworks.com`
- URL: `https://api.preteworks.com/v1/pdf/html`
- Auth: HTTP bearer

## Request body

- object
  - `html` string, required

## Response `200`

The resulting PDF.

## Other responses

- `400`: Bad request.
- `401`: Missing/invalid API key.
- `402`: No billing profile, or monthly usage cap reached.
- `429`: Rate limited (60 req/min per key).
- `502`: Upstream fetch/render failed.
- `503`: Service at daily rendering capacity.

---

[API](https://skmtc.dev/preteworks/apis/preteworks-api.md) · [All operations](https://skmtc.dev/preteworks/apis/preteworks-api/llms.txt) · [OpenAPI document](https://skmtc.dev/preteworks/apis/preteworks-api/revisions/46105b6e4bb3?raw)
