PDF Generator API

Generate PDFs from HTML, URLs, Markdown, or templates. One endpoint, multiple input modes, instant output.

POST https://pdf-api-fmard.vercel.app/api/generate

How It Works

Step 1
Send Content
POST HTML, a URL, Markdown, or choose a template
Step 2
We Render
Headless browser converts to pixel-perfect PDF
Step 3
Download PDF
Get your file back instantly — ready to use
Drop .html or .docx file here, or click to browse
Ready. Select a mode and click Generate.

API Documentation

Base URL
https://pdf-api-fmard.vercel.app
Authentication
X-API-Key: your_key (header) or ?key=your_key (query) Get your free key below
POST /api/generate

Generate a PDF from HTML, URL, Markdown, or a named template.

Request Headers

HeaderValueRequiredDescription
Content-Type application/json yes JSON request body
X-API-Key your_key yes Your API key

Request Body (JSON)

FieldTypeRequiredDescription
html string no Raw HTML content to convert
url string no Public URL to convert to PDF
markdown string no Markdown text to convert
template string no Template name (e.g. "invoice", "resume")
data object no Template variables / data object
options.format string no Paper format: A3, A4, A5, Letter, Legal. Default: A4
options.landscape boolean no Landscape orientation. Default: false
options.printBackground boolean no Print background graphics. Default: true
options.margin object no Page margins (top, right, bottom, left)
css string no Custom CSS to inject
watermark string no Watermark text overlay

Response

Content-Type
application/pdf
Body
Binary PDF data

Error Responses

// 400 — Bad Request
{ "error": "No input provided. Use html, url, markdown, or template." }

// 401 — Unauthorized
{ "error": "Invalid API key" }

// 429 — Rate Limited
{ "error": "Daily limit reached. Upgrade your plan." }

Get API Key

Get a free API key for 6 requests/day. No credit card required.

Usage

  • Add header: X-API-Key: your_key
  • Or query param: ?key=your_key

Limits

  • Playground (no key): 3 req/day
  • Free tier (with key): 6 req/day
  • Paid plans: coming soon

Pricing

Start free. Pay only when you need more.

Free
$0
  • 6 requests/day
  • 1MB max payload
  • HTML input only
  • Watermark on output
Starter
🚀 Launch Price
$24$12/mo
  • 150 requests/day
  • 3MB max payload
  • All templates
  • No watermark
Business
🚀 Launch Price
$199$99/mo
  • 3,000 requests/day
  • 10MB max payload
  • Custom templates
  • Priority support
Pay as You Go

No monthly commitment. Pay only for what you use. All features included.