Install
openclaw skills install pdf-api-hubUse when: integrating with PDF API Hub REST APIs for document automation — HTML/URL to PDF, merge, split, compress, OCR, watermark, sign, lock/unlock, convert, screenshot, parse, and file management via pdfapihub.com.
openclaw skills install pdf-api-hubUser needs to call PDF API Hub endpoints (pdfapihub.com/api/v1/...) for document automation: generating PDFs from HTML/URLs, merging, splitting, compressing, OCR, watermarking, signing, encrypting/decrypting, converting between PDF and images, parsing/extracting text and tables, or managing uploaded files.
This skill ONLY:
This skill NEVER:
All code examples are reference patterns for the user to implement.
| Topic | File |
|---|---|
| All endpoints & parameters | endpoints.md |
| Code examples by use case | examples.md |
| Advanced workflows | advanced.md |
Every request requires the CLIENT-API-KEY header.
CLIENT-API-KEY: <your-api-key>
Content-Type: application/json
Get your API key at pdfapihub.com/signup.
https://pdfapihub.com/api/v1/
All endpoints use POST with JSON body.
| # | Category | Endpoint | Path | What it does |
|---|---|---|---|---|
| 1 | Document | Generate PDF | /generatePdf | Render HTML or capture any webpage as a PDF |
| 2 | Document | Parse PDF | /pdf/parse | Extract text, tables, or structured layout data |
| 3 | Document | Merge PDFs | /pdf/merge | Combine multiple PDFs into one |
| 4 | Document | Split PDF | /pdf/split | Split a PDF into pages, ranges, or chunks |
| 5 | Document | Compress PDF | /compressPdf | Shrink file size (4 compression levels) |
| 6 | Document | PDF Info | /pdf/info | Get metadata and page info from a PDF |
| 7 | Document | Watermark | /watermark | Overlay text/logo watermarks on pages |
| 8 | Document | Sign PDF | /sign-pdf | Stamp a signature image on PDF pages |
| 9 | Security | Lock PDF | /lockPdf | AES-256 encryption with granular permissions |
| 10 | Security | Unlock PDF | /unlockPdf | Remove password protection |
| 11 | Conversion | Generate Image | /generateImage | Capture URL/HTML as PNG image |
| 12 | Conversion | Compress Image | /compressImage | Reduce image file size |
| 13 | Conversion | PDF to Image | /pdfToImage | Render PDF pages as PNG/JPG/WebP |
| 14 | Conversion | Image to PDF | /imageToPdf | Combine images into a PDF |
| 15 | OCR | PDF OCR | /pdfOcr | Extract text from scanned PDF documents |
| 16 | OCR | Image OCR | /imageOcr | Extract text from photos/images |
| 17 | Utility | URL to HTML | /urlToHtml | Fetch fully-rendered HTML via headless browser |
| 18 | File Mgmt | Upload File | /uploadFile | Upload a file to cloud storage |
| 19 | File Mgmt | List Files | /listFiles | List uploaded files |
| 20 | File Mgmt | Delete File | /deleteFile | Delete an uploaded file |
| 21 | Templates | Create Template | /createTemplate | Save a reusable HTML template |
| 22 | Templates | List Templates | /listTemplates | List saved templates |
| 23 | Templates | Delete Template | /deleteTemplate | Delete a saved template |
Most endpoints support the output_format parameter:
| Value | Description |
|---|---|
url | Returns a hosted CDN URL (default) |
file | Returns the file as a download |
base64 | Returns base64-encoded content |
binary | Returns raw binary stream |
pdf | Returns PDF file directly |
| HTTP Code | Meaning | Action |
|---|---|---|
| 400 | Invalid Request | Check JSON body shape and required fields |
| 401 | Unauthorized | Verify CLIENT-API-KEY header |
| 422 | Validation Failed | Check URL/HTML/options for conflicts |
| 429 | Rate Limited | Back off and retry with exponential delay |
| 500 | Internal Error | Retry; contact support if persistent |
{
"success": true,
"pdf_url": "https://cdn.pdfapihub.com/pdf/a1b2c3d4.pdf",
"file_size_bytes": 84321,
"file_deletion_date": "2026-05-04",
"source_type": "html"
}
{ "output_format": "url" }
Don't rely on defaults — be explicit about whether you need a URL, file, or base64.
{
"html_content": "<h1>Invoice #{{number}}</h1>",
"css_content": "h1 { color: #333; }",
"dynamic_params": { "number": "INV-001" }
}
{
"url": "https://example.com/report",
"wait_until": "networkidle",
"paper_size": "A4"
}
For endpoints that operate on existing PDFs (merge, split, compress, etc.), provide files via:
Always check success: true in the response before using the result.
| Trap | Consequence | Fix |
|---|---|---|
Missing CLIENT-API-KEY header | 401 error | Always include the header |
Sending both url and html_content | Undefined behavior | Use one or the other |
Not setting wait_until for SPAs | Incomplete capture | Use networkidle for JS-heavy pages |
Ignoring file_deletion_date | Broken links after expiry | Download/store files before deletion |
| Large HTML without pagination | Timeout or huge PDF | Use page_size to limit output |
pdfapihub.com over HTTPS