LightningPDF
## LightningPDF API Convert HTML, CSS, and Markdown to pixel-perfect PDFs via REST API. ### Key Features * **Dual Engine** : Go-native engine for simple docs (<100ms), Chromium for complex layouts. * **Multiple Inputs** : HTML, CSS, Markdown, or reusable templates with variables. * **Post-Processing** : Merge, split, compress, password-protect, and convert to PDF/A. * **Batch API** : Generate…
LightningPDF endpoints
| Method | Endpoint | Description |
|---|---|---|
| PDF Generation | ||
| POST |
/pdf/generate /pdf/generate |
Generate a PDF from HTML, CSS, Markdown, or a saved template. Returns base64-encoded PDF data in JSON response. Optionally store the PDF via Records as a Service. |
| POST |
/pdf/download /pdf/download |
Generate a PDF and return it as a binary file download. Same inputs as /pdf/generate but returns raw PDF bytes. |
| Post-Processing | ||
| POST |
/pdf/compress /pdf/compress |
Reduce PDF file size with optimized compression. Response includes X-Original-Size and X-Compressed-Size headers. |
| POST |
/pdf/info /pdf/info |
Extract metadata from a PDF (page count, dimensions, version, encryption status) |
| POST |
/pdf/protect /pdf/protect |
Add AES-256 password protection to a PDF |
| POST |
/pdf/merge /pdf/merge |
Merge 2-50 PDF files into a single PDF. Upload PDFs as multipart form data. |
| POST |
/pdf/split /pdf/split |
Split a PDF into individual pages, returned as base64-encoded PDFs |
| POST |
/pdf/pdfa /pdf/pdfa |
Convert a PDF to PDF/A format for archival compliance. Requires Pro plan or higher. |
| Async Jobs | ||
| GET |
/pdf/jobs/{id}/download /pdf/jobs/{id}/download |
Download the PDF result of a completed async job as a binary file |
| POST |
/pdf/jobs /pdf/jobs |
Queue a PDF generation job for async processing. Returns immediately with a job ID. Poll the job status endpoint or use a webhook URL to be notified when complete. |
| GET |
/pdf/jobs/{id} /pdf/jobs/{id} |
Get the status and result of an async PDF job |
| Batch | ||
| POST |
/pdf/batch /pdf/batch |
Generate multiple PDFs in a single request (1-100 items). Each item is queued as an async job. Credits consumed upfront. Requires Business plan or higher. |
| Templates | ||
| GET |
/templates /templates |
Get all templates for the authenticated user |
| GET |
/templates/{id} /templates/{id} |
Get a template by ID |
| PUT |
/templates/{id} /templates/{id} |
Update an existing template |
| POST |
/templates /templates |
Create a new reusable PDF template |
| DELETE |
/templates/{id} /templates/{id} |
Delete a template by ID |
| Starter Templates | ||
| GET |
/starter-templates /starter-templates |
Browse the pre-built template library grouped by category. No authentication required. |
| GET |
/starter-templates/{slug} /starter-templates/{slug} |
Get a specific starter template by slug. No authentication required. |
| GET |
/starter-templates/categories /starter-templates/categories |
Get available starter template categories. No authentication required. |
| POST |
/starter-templates/{slug}/import /starter-templates/{slug}/import |
Import a starter template into your account as a reusable template |
| Records | ||
| GET |
/records/pricing /records/pricing |
Get pricing information for PDF storage tiers |
| GET |
/records/{id} /records/{id} |
Retrieve information about a stored PDF and get download URL |
| API Keys | ||
| DELETE |
/keys/{id} /keys/{id} |
Revoke and delete an API key |
| GET |
/keys /keys |
Get all API keys for the authenticated user |
| POST |
/keys /keys |
Create a new API key for programmatic access |
| Usage | ||
| GET |
/usage /usage |
Get credit usage stats for the current billing period |
| Health | ||
| GET |
/health /health |
Check if the API is healthy |
LightningPDF pricing
| Plan | Price | Rate limit | Quotas |
|---|---|---|---|
| BASIC | Free | — |
|