API Docs
Generate images/PDFs and run PDF tools (merge, split, compress, lock/unlock, parse, watermark) via simple JSON requests—use it from no-code tools (n8n, Make, Zapier, Pipedream) or your own app.
Overview
Call endpoints with JSON + an API key.
Authentication
Auto-load your API key (when signed in).
HTML/URL → Image
Create a PNG from a URL or raw HTML. Best for thumbnails, social cards, and screenshots.
- Generate OG images for SEO/social sharing
- Create thumbnails for HTML reports or landing pages
- Render HTML templates into images for notifications
| Name | Type | Required | Description |
|---|---|---|---|
| CLIENT-API-KEY | string | Yes | API key used for authentication. Location: header |
| url | string (uri) | No | Public URL to capture. Provide either `url` or `html_content` (not both). Example: https://example.com Location: body |
| html_content | string | No | Raw HTML to render. Provide either `url` or `html_content` (not both). Example: <div style='padding:24px'><h1>Hello</h1></div> Location: body |
| css_content | string | No | Optional CSS to apply to `html_content`. Example: body { font-family: Inter; } Location: body |
| output_format | string | No | Output mode. Common values: `url`, `base64`, `both`. Example: url Location: body |
| width | integer | No | Output image width in pixels. Example: 1280 Location: body |
| height | integer | No | Output image height in pixels. Example: 720 Location: body |
| quality | integer (30..100) | No | Compression quality for output modes that support it. Example: 90 Location: body |
| full_page | boolean | No | If true, captures the full page (URL mode only). Example: false Location: body |
| wait_till | integer | No | Wait time in seconds before capturing (helps with animations/data loading). Example: 2 Location: body |
| wait_until | string | No | Navigation ready state for URLs: `load`, `domcontentloaded`, `networkidle`. Example: networkidle Location: body |
| font | string | No | Google Font name(s) to include, separated with `|` for multiple. Example: Poppins|Montserrat Location: body |
| dynamic_params | object | No | Key/value replacements for templated HTML (e.g., {{name}}). Example: {"name":"Alice"} Location: body |
HTML/URL → PDF
Create a PDF from a URL or raw HTML. Best for invoices, reports, and printable documents.
- Generate invoices and receipts
- Create printable reports from dashboards
- Produce shipping labels and forms
| Name | Type | Required | Description |
|---|---|---|---|
| CLIENT-API-KEY | string | Yes | API key used for authentication. Location: header |
| url | string (uri) | No | Public URL to convert. Provide either `url` or `html_content` (not both). Example: https://example.com Location: body |
| html_content | string | No | Raw HTML to convert. Provide either `url` or `html_content` (not both). Example: <html><body><h1>Invoice</h1></body></html> Location: body |
| css_content | string | No | Optional CSS to apply to `html_content`. Example: body { font-family: Arial; } Location: body |
| output_format | string | No | Output mode. Common values: `url` (hosted), `pdf`/`file` (binary response). Example: url Location: body |
| paper_size | string | No | Paper size preset (A4, Letter, Legal, etc.). Example: A4 Location: body |
| landscape | boolean | No | Render in landscape orientation. Example: false Location: body |
| printBackground | boolean | No | Include background graphics. Usually `true` for branded PDFs. Example: true Location: body |
| preferCSSPageSize | boolean | No | Prefer @page size from CSS. Useful for pixel-perfect templates. Example: true Location: body |
| viewPortWidth | integer | No | Viewport width used when rendering. Example: 1920 Location: body |
| viewPortHeight | integer | No | Viewport height used when rendering. Example: 1080 Location: body |
| wait_till | integer | No | Wait time in seconds before generating the PDF. Example: 2 Location: body |
| dynamic_params | object | No | Key/value replacements for templated HTML (e.g., {{invoice_id}}). Example: {"invoice_id":"INV-1001"} Location: body |
Merge PDFs
Merge multiple PDFs into one.
- Combine invoices into one statement
- Merge a cover page with generated pages
- Create a single archive PDF
| Name | Type | Required | Description |
|---|---|---|---|
| CLIENT-API-KEY | string | Yes | API key used for authentication. Location: header |
| urls | string[] (uri) | No | Array of PDF URLs to merge (2..15). Example: ["https://.../doc1.pdf","https://.../doc2.pdf"] Location: body |
| files | string[] (base64) | No | Alternative to `urls`: base64-encoded PDFs to merge. Example: ["JVBERi0xLjc...","JVBERi0xLjc..."] Location: body |
| output | string | No | Return mode: `url`, `file`, or `base64`. Example: url Location: body |
Split / Extract Pages
Split a PDF into parts or extract a page range.
- Extract only the signature page
- Split large PDFs per section
- Create per-customer statements from a batch
| Name | Type | Required | Description |
|---|---|---|---|
| CLIENT-API-KEY | string | Yes | API key used for authentication. Location: header |
| url | string (uri) | No | URL of the PDF to split. Example: https://pdfmunk.com/sample1.pdf Location: body |
| file | string (base64) | No | Alternative input: base64-encoded PDF. Location: body |
| pages | string | No | Page selector: "3", "1-5", "1-3,5,7-10", "10-". Example: 1-2,3- Location: body |
| mode | string | No | Split strategy (optional): `each` (one file per page). Example: each Location: body |
| chunks | integer | No | Alternative to pages: number of chunks to split into. Example: 4 Location: body |
| output | string | No | Return mode: `url`, `file`, or `base64`. Example: url Location: body |
Compress PDF
Best-effort optimization pass to reduce PDF file size.
- Shrink PDFs before emailing
- Reduce storage and bandwidth costs
- Prepare files for size-limited uploads
| Name | Type | Required | Description |
|---|---|---|---|
| CLIENT-API-KEY | string | Yes | API key used for authentication. Location: header |
| url | string (uri) | Yes | Public URL to a PDF. Example: https://pdfmunk.com/sample1.pdf Location: body |
| compression | string | No | Compression strength: `low`, `medium`, `high`, `max`. Example: high Location: body |
| output | string | No | Return mode: `url`, `file`, or `base64`. Example: url Location: body |
| output_name | string | No | Optional output file name. Example: compressed.pdf Location: body |
Lock PDF (Encrypt)
Add password protection to a PDF.
- Securely distribute reports
- Protect invoices before sharing
- Require a password for sensitive documents
| Name | Type | Required | Description |
|---|---|---|---|
| CLIENT-API-KEY | string | Yes | API key used for authentication. Location: header |
| url | string (uri) | Yes | Public URL to a PDF. Example: https://pdfmunk.com/sample1.pdf Location: body |
| password | string | Yes | Password to set on the PDF. Example: secret123 Location: body |
| input_password | string | No | If the input PDF is already encrypted, provide its password. Example: existingPassword Location: body |
| output | string | No | Return mode: `url`, `file`, or `base64`. Example: url Location: body |
| output_name | string | No | Optional output file name. Example: locked_document.pdf Location: body |
Unlock PDF
Remove password protection from a PDF.
- Process protected PDFs in automation
- Unlock before parsing/merging/splitting
- Recover access for downstream tools
| Name | Type | Required | Description |
|---|---|---|---|
| CLIENT-API-KEY | string | Yes | API key used for authentication. Location: header |
| url | string (uri) | Yes | Public URL to an encrypted PDF. Example: https://pdfmunk.com/sampleprotected.pdf Location: body |
| password | string | Yes | Password to unlock the PDF. Example: secret123 Location: body |
| output | string | No | Return mode: `url`, `file`, or `base64`. Example: url Location: body |
| output_name | string | No | Optional output file name. Example: unlocked_document.pdf Location: body |
Parse PDF → JSON
Extract text, layout blocks, tables, and image metadata from a PDF.
- Search indexing
- Table extraction
- RAG pipelines / document understanding
| Name | Type | Required | Description |
|---|---|---|---|
| CLIENT-API-KEY | string | Yes | API key used for authentication. Location: header |
| url | string (uri) | Yes | Public URL to a PDF. Example: https://pdfmunk.com/sample1.pdf Location: body |
| mode | string | No | Extraction mode: `text`, `layout`, `tables`, or `full`. Example: full Location: body |
| pages | string | No | Page selection: 'all', a single page ('2'), or a range ('1-3'). Example: 1-3 Location: body |
Watermark PDF/Image
Adds a diagonal text watermark to a PDF or image. This "Try it" runner sends JSON, so use `file_url` or `base64_file` here (multipart upload is also supported).
- Add CONFIDENTIAL/DRAFT stamps
- Brand PDFs before sharing
- Watermark images before publishing
| Name | Type | Required | Description |
|---|---|---|---|
| CLIENT-API-KEY | string | Yes | API key used for authentication. Location: header |
| output_format | string | No | Output format: `file`, `url`, `base64`, or `both`. Example: url Location: body |
| file_url | string (uri) | No | Publicly accessible PDF/image URL. Example: https://example.com/file.pdf Location: body |
| base64_file | string (base64) | No | Base64-encoded file contents (raw base64 or data URL). Location: body |
| text | string | No | Watermark text. Example: DRAFT Location: body |
| opacity | number (0.0..1.0) | No | Watermark opacity. Example: 0.2 Location: body |
| angle | integer | No | Rotation angle in degrees. Example: 45 Location: body |
| font_size | integer | No | Optional font size override. Example: 48 Location: body |
Support
Need help integrating?