DocuStream renders your HTML with a headless Chromium browser and returns a signed URL to a pixel-perfect PDF — in seconds, at any scale.
Write your HTML with Handlebars {{variable}} placeholders. Use any CSS you like — DocuStream renders with a headless Chromium browser (Puppeteer), so your design comes out exactly as intended.
POST your template to /api/templates. DocuStream auto-detects every {{variable}} and stores the template in your account, ready to accept data.
POST JSON data to /api/pdfs/generate with your template ID and variable values. DocuStream renders the HTML, injects your data, and returns a signed URL to the finished PDF.
Share the signed URL directly, embed it in an email, or use our /api/emails endpoint to send the document automatically. Every access is logged so you always know who opened what.
DocuStream's REST API is designed to be simple. Authenticate with an API key, POST your template ID and variables, and receive a signed download URL — no SDK required.
// Generate a PDF from an HTML template
const response = await fetch('https://your-docustream.app/api/pdfs/generate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY',
},
body: JSON.stringify({
templateId: 'tmpl_abc123',
variables: {
customerName: 'Acme Corp',
invoiceNumber: 'INV-0042',
total: '$1,250.00',
},
}),
});
const { signedUrl } = await response.json();
// signedUrl → time-limited URL to the generated PDFPowered by Puppeteer / headless Chromium — the same engine your browser uses. Your CSS layouts, fonts, and images render exactly as designed.
Use {{variable}} placeholders in your HTML. DocuStream auto-detects variables when you save the template and fills them at generation time.
Every generated PDF is stored securely and served via time-limited signed URLs, so only authorised recipients can download the file.
Send the generated PDF directly to a recipient in the same API call. DocuStream handles MailerSend delivery and logs every send.
Need 500 invoices? POST an array of variable sets and DocuStream generates all PDFs in parallel, returning a signed URL for each.
No OAuth flows or complex setup. Add an X-API-Key header and you're generating PDFs within minutes of signing up.
Free plan includes 10 PDFs per month — no credit card required. Upgrade when you're ready to scale.
Get started free