latestOpenAPI 3.0.02026-08-102413.0 KB

ce258d1167ca

PDF

Generate a PDF from HTML or Markdown

Generates a PDF document from either Markdown content or raw HTML/CSS. The generation mode is determined automatically: if the request body contains type: "html" or the data property includes an html key, HTML-to-PDF rendering is used; otherwise, Markdown-to-PDF rendering is used.

Markdown mode accepts structured content blocks (headings, labels, body text, and tables) and renders them into a styled PDF with optional logo, timestamp, and custom page dimensions.

HTML mode accepts raw HTML and optional CSS, rendering them directly into a PDF with optional custom page dimensions.

Supports both JSON and multipart/form-data request bodies. Requires API key (Basic auth) or OAuth authentication.

post/api/v1/generate-pdf

Request body

OR

Response

The generated PDF document.