Generate API · vibe coders · SaaS · agents

HTML in.
Perfect PDF out.

Two lines of code. Production-quality PDF. No Puppeteer babysitting, no template tax for the simple path. When you need versioning, switch to templates. When you need print, the same stack can preflight.

Canonical base: https://pdfmodule.com/api/v1 · 100 free PDFs/mo

# Instant PDF — no template curl -o quote.pdf -X POST \ https://pdfmodule.com/api/v1/render-html \ -H "Authorization: Bearer $PDFMODULE_KEY" \ -H "Content-Type: application/json" \ -d '{"html":"<h1>Quote #42</h1>","engine":"chromium"}'
// npm-free single file SDK const PDFModule = require('./pdfmodule-node'); const client = new PDFModule(process.env.PDFMODULE_KEY); const pdf = await client.renderHtml('<h1>Quote #42</h1>'); require('fs').writeFileSync('quote.pdf', pdf);
# pip install requests from pdfmodule_python import PDFModule client = PDFModule(os.environ['PDFMODULE_KEY']) pdf = client.render_html('<h1>Quote #42</h1>') open('quote.pdf', 'wb').write(pdf)
# Markdown → finished PDF curl -o notes.pdf -X POST \ https://pdfmodule.com/api/v1/render-html \ -H "Authorization: Bearer $PDFMODULE_KEY" \ -H "Content-Type: application/json" \ -d '{"markdown":"# Notes\n\n- Ship it\n- **Bold** works","engine":"chromium"}'

Three ways to write a PDF

Start instant. Graduate to templates when you need determinism and versioning.

1. HTML → PDF

POST /render-html with your HTML. Chromium or wkhtmltopdf. Headers, footers, margins. Done.

2. Markdown → PDF

Pass markdown — we wrap it in print-ready typography. Perfect for agents and notes.

3. Template + data

POST /render with a slug and JSON. Versioned, lockable, hashable. New accounts get hello + invoice.

Not another Puppeteer side quest

You already write HTML. You shouldn’t also run headless browsers, fight fonts, and patch deploys.

  • Hosted Chromium + wkhtmltopdf
  • API key auth & metering
  • Deterministic template path
  • Same stack can preflight print files
  • Works from curl, Node, Python, PHP
  • AI agent prompts on /compare

When “good on screen” isn’t enough

Generate is for writing documents. Studio and Print API finish them for ink. Optional ladder — not required on day one.

GenerateHTML / MD / template
PreflightCatch bleed, RGB, fonts
ImposeXJDF fold catalog