PDF Munk API Reference
API key for authentication. Get your key from https://pdfmunk.com/dashboard
URL of the webpage to convert to PDF
https://example.comHTML content to convert to PDF
<html><body><h1>Hello World</h1></body></html>Optional CSS to apply to the HTML
body { font-family: Arial; }Output format:
url: Returns a URL to the uploaded PDF (default)pdf,binary,file: Returns the PDF file directly
urlPossible values: Paper size for the PDF
A4Possible values: Set to true for landscape orientation
falseWhether to print background graphics
trueWhether to display header and footer
falseWhether to prefer CSS-defined page size
trueMaximum number of pages to generate (tier-dependent)
10Custom paper width in pixels
800Custom paper height in pixels
1200Viewport width for rendering
1080Example: 1920Viewport height for rendering
720Example: 1080Google Font name(s) to include (use | separator for multiple)
Roboto|Open SansTime to wait in seconds before generating PDF
0Example: 2PDF generated successfully
trueURL to download the PDF (when output_format is 'url')
https://storage.pdfmunk.com/pdfs/abc123.pdf51234Date when the file will be deleted (30 days)
2026-01-12htmlPossible values: Bad request - validation error
Unauthorized - invalid or missing API key
Internal server error
API key for authentication. Get your key from https://pdfmunk.com/dashboard
URL of the webpage to capture as image
https://example.comHTML content to render as image
<div style='padding: 20px;'><h1>Hello</h1></div>Optional CSS to apply to the HTML
div { background: white; }Output format:
url: Returns a URL to the uploaded image (default)base64: Returns base64-encoded image stringboth: Returns both URL and base64image,png,binary,file: Returns the image file directly
urlPossible values: Width of the output image in pixels
1280Example: 800Height of the output image in pixels
720Example: 600Viewport width for rendering (if different from output width)
1920Viewport height for rendering (if different from output height)
1080Device scale factor for higher resolution
1Example: 2Image quality (30-100)
80Example: 90Capture full page (for URLs only)
falseTime to wait in seconds before capturing
0Example: 2When to consider navigation successful (for URLs)
loadPossible values: Google Font name(s) to include (use | separator for multiple)
Poppins|MontserratImage generated successfully
trueURL to download the image (when output_format is 'url' or 'both')
https://storage.pdfmunk.com/images/xyz789.pngBase64-encoded image (when output_format is 'base64' or 'both')
iVBORw0KGgoAAAANSUhEUgAAAAUA...284912026-01-12550e8400-e29b-41d4-a716-446655440000Time taken to generate the image in milliseconds
1523Bad request
Unauthorized
Rate limit exceeded
Internal server error
API key for authentication. Get your key from https://pdfmunk.com/dashboard
Type of chart to generate
barPossible values: Width of the chart in pixels
800Example: 1000Height of the chart in pixels
600Example: 600Output format for the chart image
urlPossible values: Chart generated successfully
trueURL to the chart image (when output_format is 'url' or 'both')
Base64-encoded chart (when output_format is 'base64' or 'both')
456782026-01-12892Bad request
Unauthorized
API key for authentication. Get your key from https://pdfmunk.com/dashboard
URL of the image to compress
https://example.com/image.jpgBase64-encoded image (alternative to image_url)
data:image/jpeg;base64,/9j/4AAQSkZJRg...Format of the compressed image output
urlPossible values: Compression quality (1-100, higher = better quality)
85Example: 80Image compressed successfully
trueURL to compressed image (when output_format is 'url')
Base64-encoded compressed image (when output_format is 'base64')
1048576524288512Percentage of size reduction
502026-01-12Bad request
API key for authentication. Get your key from https://pdfmunk.com/dashboard
Array of PDF URLs to merge
["https://example.com/doc1.pdf","https://example.com/doc2.pdf","https://example.com/doc3.pdf"]PDFs merged successfully
truehttps://storage.pdfmunk.com/merged/abc123.pdfTotal number of pages in merged PDF
45Number of input PDFs merged
32026-01-12Bad request
API key for authentication. Get your key from https://pdfmunk.com/dashboard
URL of the PDF to split
https://example.com/document.pdfPage range specification
1-5,8,10-PDF split successfully
truehttps://storage.pdfmunk.com/split/xyz789.pdfNumber of pages extracted
8Total pages in original PDF
502026-01-12Bad request
API key for authentication. Get your key from https://pdfmunk.com/dashboard
PDF file to unlock
Password to unlock the PDF
secret123Optional custom name for output file
unlocked_document.pdfPDF unlocked successfully
truePDF unlocked successfullyhttps://storage.pdfmunk.com/unlocked/file123.pdfprotected_document.pdfprotected_document.pdfBad request or incorrect password
API key for authentication. Get your key from https://pdfmunk.com/dashboard
URL to fetch HTML from
https://example.comWhen to consider navigation successful
loadPossible values: Maximum wait time in milliseconds
30000Example: 60000CSS selector to wait for before returning HTML
#contentAdditional wait time in milliseconds after page load
0Example: 2000Viewport width
1920Example: 1920Viewport height
1080Example: 1080Custom user agent string
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36HTML fetched successfully
truehttps://example.comThe HTML content of the page
Unix timestamp when content was fetched
1702473600Bad request
Last updated