PDF Generator API: HTML to PDF, With Prices Compared
Updated by Cyril Nicodème
Send PDFShift your HTML or a URL in one POST request, and the PDF comes back in the response. Your templates stay in your own code, the Chromium that renders them runs on our servers, and you can see what it costs before you sign up: free for 50 credits a month, then from $9 for 500 to $799 for 500,000.
Generate an invoice PDF from HTML with one API call
Your app already renders the invoice as HTML. Send that HTML as source, with your API key in the X-API-Key header:
curl https://api.pdfshift.io/v3/convert/pdf \
-H 'X-API-Key: sk_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"source": "<h1>Invoice #1042</h1><p>Total: $240.00</p>"}' \
-o invoice-1042.pdf
The response body is the PDF itself, so -o writes it straight to a file. Got a URL instead? Put it in source and we load the page and convert it, no extra flag.
The same call from Node.js 18 or later, and from Python with requests:
const res = await fetch('https://api.pdfshift.io/v3/convert/pdf', {
method: 'POST',
headers: {
'X-API-Key': process.env.PDFSHIFT_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({ source: invoiceHtml })
})
const pdf = Buffer.from(await res.arrayBuffer())
import os, requests
res = requests.post(
"https://api.pdfshift.io/v3/convert/pdf",
headers={"X-API-Key": os.environ["PDFSHIFT_API_KEY"]},
json={"source": invoice_html},
)
pdf = res.content
Read the body as bytes, not JSON. If you'd rather have a link, add "filename": "invoice-1042" and the response turns into JSON with a url to the PDF, plus filesize, duration and pdf_pages. Add "encode": true and the PDF comes back Base64-encoded. Every parameter is in the convert reference (API v3).
Templates in a visual editor, or your own HTML?
We render the HTML and CSS you already have, with a current Chromium. Most of the other PDF generator APIs you'll find in a search work the opposite way: you rebuild the template in their visual editor, then fill it with JSON. If your developers own the layout, that's a second copy of every template, in another company's editor, to keep in sync. Rather keep templates with us? Store them as HTML through the API and send only the data each time.
PDF generation API comparison: what 500 to 500,000 PDFs a month cost
We count 1 credit per 5 MB of output, so an invoice or a report of a few pages costs 1 credit. Here's the smallest published plan that covers each volume of one-page PDFs, and what it costs a month:
| API | Billed by | 500 a month | 5,000 | 50,000 | 500,000 |
|---|---|---|---|---|---|
| PDFShift | credit (1 per 5 MB) | $9 | $39 | $149 | $799 |
| PDF Generator API | credit (1 per 1 to 5 pages) | €43, billed yearly | €73, billed yearly | €296, billed yearly | not published |
| CraftMyPDF | $29 | $99 | $499 | contact sales | |
| APITemplate.io | $24 | $89 | not published | not published | |
| PDFMonkey | document | €6.60 | €29 | €300 | €2,500 |
| Nutrient DWS API | credit (0.5 per HTML to PDF) | $75 | $275 | contact sales | contact sales |
| Adobe PDF Services | document transaction | free tier, 500 a month | contact sales | contact sales | contact sales |
| DocRaptor | document | $75 | $149 | contact sales | contact sales |
| Api2Pdf | MB and compute second | about $1.25 | about $3.46 | about $26 | about $247 |
Prices as of November 9, 2026, billed monthly unless the row says otherwise. PDFMonkey's figures include its published per-document overage. Api2Pdf charges $1 a month plus bandwidth and compute time, so its figures use the 0.1 MB, 2-second PDF from its own pricing example. A heavier page costs more.
The more PDFs you make, the fewer of these APIs will tell you the price:
You shouldn't need a sales call to know what your next invoice run costs. Every PDFShift plan, up to 1,000,000 credits for $999 a month, is on the pricing page.
Webhooks, async and batch PDF generation
By default, your request waits until the PDF is ready. For long documents or big runs, add a webhook URL: the API answers at once with 202 and a queued status, then POSTs the result to your webhook with a link to the file. To skip our storage, set s3_destination and the PDF goes straight to your own S3 bucket.
A batch job is just more of the same calls: one request per document, in parallel, up to 250 a minute, with a webhook to collect the results. One conversion can run for up to 15 minutes on a paid plan.
HIPAA, BAA and GDPR: PDFs generated in the EU
PDFShift is a French company, and conversions run on our servers in France. We don't keep your documents by default. A PDF is stored only when you ask for a link (filename or webhook), on AWS S3 in Paris, and it's deleted after 2 days. For GDPR, our data processing agreement is public.
For health data, set is_hipaa: true on the request and sign our BAA. With it on, filename and webhook need your own s3_destination, so the file never sits in our storage.
Frequently asked questions
Is there a free PDF generator API?
Yes. PDFShift's free plan gives you 50 credits a month with no credit card, for files up to 15 MB and conversions up to 30 seconds. For testing, add "sandbox": true to a request: the PDF gets a watermark and uses no credits, up to 10 documents a minute.
How do I automate PDF generation without writing a backend?
Use a no-code tool that can call PDFShift, such as n8n, Make or Zapier, or give an AI agent our hosted MCP server. Each one calls the same API as the code on this page.
Which browser engine renders my HTML?
Chromium. New accounts get the latest version PDFShift offers, and the X-Processor-Version header lets you pin one of the accepted versions, 116 or 142.
Can the same API make images instead of PDFs?
Yes. Separate endpoints return PNG, JPEG or WebP from the same HTML or URL.