Documentation
Quickstart
Create an API key and render your first PDF in about two minutes.
1. Create a key
Sign in with Google or GitHub, then open API keys and press Create key. The full key is shown once — store it in your secret manager.
key format
pp24_live_<48 hex characters>
pp24_test_<48 hex characters>2. Render a PDF
curl
curl -X POST https://www.pdfpilot24.com/api/v1/pdf/html \
-H "Authorization: Bearer $PDFPILOT_KEY" \
-H "Content-Type: application/json" \
-d '{
"html": "<h1>Invoice 1042</h1><p>Acme Pvt Ltd</p><p>Total: ₹44,745.60</p>",
"paper": "A4",
"printBackground": true
}' \
--output invoice-1042.pdfThe response is the PDF itself, with useful headers:
response headers
content-type: application/pdf
x-pdfpilot-pages: 1
x-pdfpilot-credits-remaining: 499
x-pdfpilot-request-id: req_9f2c4a7b1d3. Node.js
node
const res = await fetch("https://www.pdfpilot24.com/api/v1/pdf/html", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PDFPILOT_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
html: "<h1>Hello</h1>",
paper: "A4",
}),
});
if (!res.ok) {
const problem = await res.json();
throw new Error(problem.error.code);
}
const pdf = Buffer.from(await res.arrayBuffer());
await fs.writeFile("hello.pdf", pdf);4. Python
python
import requests
res = requests.post(
"https://www.pdfpilot24.com/api/v1/pdf/html",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"html": "<h1>Hello</h1>", "paper": "A4"},
timeout=60,
)
res.raise_for_status()
open("hello.pdf", "wb").write(res.content)No card is required for the first 500 pages each month. See limits & metering for exactly how pages are counted.
Need something not covered? Contact support.