Chromium-rendered PDFs from HTML or a URL, plus the PDF toolbox: merge, split, compress, password-protect, unlock, images-to-PDF — and website screenshots from the same browser.
POST/api/html-pdf/render
HTML (or a URL) in, a pixel-perfect PDF out.
curl -X POST https://toolbeam.app/api/html-pdf/render \
-H "X-API-Key: pk_your_key" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Invoice #42</h1>", "format": "A4"}' \
--output invoice.pdf
- —Send html or url, never both. URL mode validates every redirect hop — private addresses are refused.
- —Large documents: POST /html-pdf/render/async returns 202 + a job id; poll /html-pdf/jobs/{id}, download at /jobs/{id}/download.
POST/api/html-pdf/pdf/merge
Combine up to 20 PDFs, in the order the files are sent.
curl -X POST https://toolbeam.app/api/html-pdf/pdf/merge \
-H "X-API-Key: pk_your_key" \
-F "files=@a.pdf" -F "files=@b.pdf" --output merged.pdf
- —Author/title metadata from the sources is stripped from the result.
POST/api/html-pdf/pdf/split
Extract pages ("1-3,7,12-") as one PDF, or split into fixed chunks.
curl -X POST https://toolbeam.app/api/html-pdf/pdf/split \
-H "X-API-Key: pk_your_key" \
-F "file=@doc.pdf" -F "ranges=1-3,7" --output pages.pdf
- —One output arrives as a bare PDF; several arrive as a zip.
- —Or mode=every with every=5 to break the document into fixed 5-page chunks.
POST/api/html-pdf/pdf/compress
Shrink a PDF by re-encoding its images — never returns a larger file.
curl -X POST https://toolbeam.app/api/html-pdf/pdf/compress \
-H "X-API-Key: pk_your_key" \
-F "file=@scan.pdf" -F "level=medium" --output smaller.pdf
- —X-Original-Bytes / X-Compressed-Bytes / X-Images-Reencoded report the honest result.
POST/api/html-pdf/pdf/protect
Encrypt a PDF with AES-256. The password is used once, never stored.
curl -X POST https://toolbeam.app/api/html-pdf/pdf/protect \
-H "X-API-Key: pk_your_key" \
-F "file=@doc.pdf" -F "password=correct-horse-battery" --output locked.pdf
POST/api/html-pdf/pdf/unlock
Remove a password you know. The correct password is required — by design.
curl -X POST https://toolbeam.app/api/html-pdf/pdf/unlock \
-H "X-API-Key: pk_your_key" \
-F "file=@locked.pdf" -F "password=correct-horse-battery" --output open.pdf
POST/api/html-pdf/images/pdf
Images in (up to 30), one PDF out — one page per image, order preserved.
curl -X POST https://toolbeam.app/api/html-pdf/images/pdf \
-H "X-API-Key: pk_your_key" \
-F "files=@page1.jpg" -F "files=@page2.png" --output album.pdf
POST/api/html-pdf/screenshot
A PNG or JPEG of a live URL, rendered in real Chromium.
curl -X POST https://toolbeam.app/api/html-pdf/screenshot \
-H "X-API-Key: pk_your_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "width": 1280, "full_page": true}' \
--output page.png
- —Width 320-1920. Private and internal addresses are blocked on every hop.