HTML · URL · Template → PDF API

ShipPDFs,notChromium.

POST HTML, a public URL, or a template plus JSON data — get a signed download URL back. The browser engine runs on our infrastructure, not in your serverless function.

Hobby is free — 100 PDFs a month, no credit card.

leafwright.co/docs/api
$ POST /api/v1/pdfs
Authorization: Bearer lw_live_•••••

{
  "source": { "type": "html", "html": "<h1>Invoice #1042</h1>…" }
}

→ 200 OK
{
  "status": "succeeded",
  "download_url": "https://leafwright.co/…?signature=…"
}

One POST in, a signed URL back. All documents shown are samples with demo data — Northwind is a fictional client, not a customer.

Why not Puppeteer?

Chromium doesn't fit in your function.

Puppeteer needs Chromium, and Chromium doesn't fit serverless. Leafwright runs the browser engine on its own rendering infrastructure — your function makes one API call and stays small.

Puppeteer in your function

  • ~170 MB of Chromium against a 250 MB function limit
  • Slow cold starts and memory spikes
  • Missing fonts wherever the function happens to run

One call to Leafwright

  • The browser engine runs on Leafwright's rendering infrastructure
  • Your function makes one API call and stays small
  • A signed download URL back, with logs, retries, and webhooks

Deploying on Vercel? Puppeteer doesn't work on Vercel. Here's the fix.

Render API

Everything a render pipeline needs, nothing in your bundle.

HTML, URL, or template in

POST raw HTML, a public URL, or a published Handlebars template plus JSON data. Sources are validated before they render.

Signed URL back

Each render returns a time-limited signed download URL — or raw bytes, or a drop straight into your own S3 or GCS bucket.

Jobs you can operate

Every render is a tracked job with readable logs, retries, webhooks, and usage — from the dashboard or the API.

MCP for AI agents

A remote MCP server with OAuth plus the local @leafwright/mcp package, so Claude, Cursor, and Codex can render PDFs directly.

How it works

From your function to a finished PDF.

01

Create a key

Sign up, create a project, and grab an API key. Hobby includes 100 PDFs a month — no credit card.

02

POST a source

Send HTML, a public URL, or a published template plus JSON data to /api/v1/pdfs from any runtime.

03

Ship the URL

A signed download URL comes back in seconds, with job logs, retries, and webhooks behind it.

Studio

Same engine, also a workspace.

When a document needs human hands, the studio sits on the same render pipeline you call from code — draft, edit, and review finished PDFs without leaving Leafwright.

Draft with AI

Describe the document, audience, and key sections — get structured, on-brand output you can edit on the canvas.

Brand controls

Lock fonts, colors, and footers in a brand kit so every export stays consistent without manual cleanup.

Review & approve

Inline accessibility and print checks catch issues before a document is exported or shared.

Get started

Your first PDF is one POST away.

Start free on Hobby — 100 PDFs a month, no credit card. The full render API, templates, and render logs are on every plan.