API Reference

The RenderStack API allows you to programmatically convert HTML and CSS into high-fidelity PDF documents. Our rendering engine uses a fully managed Headless Chrome instance, ensuring that if it looks right in a modern browser, it prints right on paper.

Base URL: https://pdfitize.com/api

Authentication

Authenticate your requests by including your API key in the Authorization header of your HTTP request. You can generate API keys from your dashboard.

Authorization: Bearer sk_live_YOUR_API_KEY

Rate Limits

Your API requests are limited by your subscription plan's monthly quota. If you exceed your quota, the API will return a 429 Too Many Requests status code. Usage resets automatically at the start of your billing cycle.

Generate a PDF

Converts a raw HTML string into a downloadable binary PDF file.

POST /v1/generate

Request Body

Parameter Type Description
html
Required
string The raw HTML content you want to render. Inline CSS and external CDN links are fully supported.

Integration Examples

// Clean Vanilla JS implementation for front-end apps async function downloadPdf(htmlContent) { const response = await fetch('https://pdfitize.com/api/v1/generate', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY' }, body: JSON.stringify({ html: htmlContent }) }); if (!response.ok) throw new Error('Generation failed'); // Handle the binary PDF stream const blob = await response.blob(); const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'document.pdf'; a.click(); }