PDF Generation API
Generate PDFs from JSON with a single REST call
Design a reusable PDF template once, then render invoices, certificates, reports, and forms from your app — POST your data, get back a finished PDF. No headless browser under the hood, scalable to tens of thousands of PDFs per second.
Free — 100 PDFs/month, no credit card required.
/documents/{id}/render curl -X POST https://api.pdfmakerapi.com/api/v1/documents/{id}/render \
-H "Authorization: Bearer pmk_live_..." \
-H "Content-Type: application/json" \
-d '{
"data": {
"client_name": "Aster & Co.",
"invoice_number": "INV-2026-041",
"total": "$6,966.00"
}
}' \
--output invoice.pdf JSON in, PDF out
One REST endpoint
No headless browser
Layouts never break
Any language
Just an HTTP request
Scales to high volume
Loop, batch, or no-code
How it works
From template to PDF in three steps
Design a reusable template
Build your layout in the visual editor and wrap the parts that change in
{{variables}}
— tables, totals, addresses, anything. Save it and copy its document ID.
POST your data as JSON
Send your data to the render endpoint with an API key. Every saved template ships a ready-to-copy snippet — grab the exact endpoint, a sample request, and cURL / Node / Python from the API panel in the editor.
Get the finished PDF
The response is the PDF itself —
200 · application/pdf.
Save it, email it, or store it. One document or thousands, on demand.
Code example
One REST call: JSON in, PDF out
Authenticate with an API key (pmk_live_…) as a
Bearer token, POST a data object that matches your
template's variables, and write the response to a file.
curl -X POST https://api.pdfmakerapi.com/api/v1/documents/YOUR_DOCUMENT_ID/render \
-H "Authorization: Bearer pmk_live_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"data": {
"studio_name": "Northline Design Studio",
"client_name": "Aster & Co.",
"invoice_number": "INV-2026-041",
"due_date": "2026-07-06",
"total": "$6,966.00"
}
}' \
--output invoice.pdfconst res = await fetch(
"https://api.pdfmakerapi.com/api/v1/documents/YOUR_DOCUMENT_ID/render",
{
method: "POST",
headers: {
Authorization: "Bearer pmk_live_xxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
data: {
studio_name: "Northline Design Studio",
client_name: "Aster & Co.",
invoice_number: "INV-2026-041",
total: "$6,966.00",
},
}),
},
);
// The response body is the PDF itself.
const pdf = Buffer.from(await res.arrayBuffer());
require("fs").writeFileSync("invoice.pdf", pdf);import requests
res = requests.post(
"https://api.pdfmakerapi.com/api/v1/documents/YOUR_DOCUMENT_ID/render",
headers={"Authorization": "Bearer pmk_live_xxxxxxxxxxxxxxxx"},
json={"data": {
"studio_name": "Northline Design Studio",
"client_name": "Aster & Co.",
"invoice_number": "INV-2026-041",
"total": "$6,966.00",
}},
)
# The response body is the PDF itself.
with open("invoice.pdf", "wb") as f:
f.write(res.content) Generating in bulk? Loop or parallelize the call, or trigger it from a no-code workflow — the pipeline scales horizontally to high volume.
Use cases
What you can build
Any business document that follows the same layout every time and changes only by data.
Invoice & receipt PDF API
Turn order data into clean, branded invoices and receipts automatically — no manual document assembly.
Learn more →Report & statement PDF API
Generate data-rich business reports and account statements from JSON, complete with tables, charts, and page numbering.
Learn more →Certificate PDF API
Issue completion certificates, awards, and credentials at scale — perfect for course platforms and automation workflows.
Learn more →FAQ
Frequently asked questions
What is a PDF generation API? +
A PDF generation API turns structured data into finished PDF documents over HTTP. With PDFMakerAPI you design a reusable template once, then POST your data as JSON to a single REST endpoint and get the PDF back — no hard-coding a layout per document, and no headless browser to maintain.
How do I generate a PDF from JSON? +
Design a template with variables, then send a POST request to /api/v1/documents/{id}/render with an Authorization: Bearer key and a JSON body containing a data object. PDFMakerAPI merges your data into the template and returns the finished PDF in the response.
What does the API return? +
The finished PDF itself — a 200 response with Content-Type: application/pdf. Save the response body to a .pdf file; there is no second request to fetch a file URL.
Can the API handle large volumes? +
Yes. Because PDFMakerAPI renders from a structured template, the rendering pipeline is lightweight and scales horizontally — it can handle tens of thousands of PDF generations per second. Generate one on demand, loop or parallelize calls, or batch through a no-code workflow.
Which languages are supported? +
Any language that can make an HTTP request. The examples here are cURL, Node.js, and Python, but the same call works from PHP, Ruby, Go, Java, and more.
Is there a free tier? +
Yes — 100 PDFs per month, no credit card required. Paid usage-based tiers cover higher volume.
Generate your first PDF
Design a template, grab an API key, and POST your data. Start free with 100 PDFs every month — no credit card.