Your data in.
A beautiful PDF out.
CastPDF is a PDF generation API with a live-preview template editor. Send your data and get invoices, certificates and reports with your logo, in about a second.
- 100 free PDFs a month
- No card needed
- Your PDFs are made and stored in the EU
<h1>Invoice</h1> <p>{{ customer.name }}</p> {% for item in items %} <td>{{ item.price | money }} {% endfor %}
- About a secondfrom your data to a print-ready PDF
- Per PDF, never per page1 page or 50, it counts once
- Made in the EUrendered and stored in Germany, DPA included
- No surprise billsyou set the most you will ever pay
- Unused PDFs roll overon every paid plan, for one month
Design it once. Test it free. Connect it anywhere.
The same three steps you see in the dashboard, for every template.
- 1 Design
Pick a template and make it yours
Start with an invoice, a certificate or a blank page. Change the HTML and CSS and watch every edit in the live preview.
- 6 starters
- Your logo and fonts
- Liquid for data
- 2 Test
Try it with real data, free
Fill in sample data in Simple mode or send it with a test key. Test PDFs are unlimited on every plan and carry a watermark.
- Unlimited test PDFs
- Warnings for empty fields
- 3 Connect
Send data from anywhere
Call the API from your code, use the n8n node, or upload a spreadsheet for a batch. Get the file, a private link, an email or a webhook.
- REST API
- Batches from CSV or XLSX
- Webhooks
Every document your business sends
Each starter is a real, print-ready template with sample data. Open one, add your logo, and send your own data.
Invoices
Line items, tax and totals from your billing data, with headers repeated on long invoices.
/invoice-pdf-apiCertificates
One certificate per student or attendee, with names that always fit the line.
/certificate-generatorReceipts
Till-slip receipts sized for printing, with VAT included in prices.
/use-cases/receipt-pdf-generatorReports
Tables and charts that break cleanly across pages, with page numbers.
/use-cases/report-pdf-generatorTickets
Event tickets with a QR code and the holder’s name on each one.
/use-cases/ticket-pdf-generatorContracts
Agreements filled from your records, ready to send for signature.
/use-cases/contract-pdf-generator
Or start from a template:Invoice templateCertificate templateReceipt templateReport templateTicket templateContract template
Works with your stack today, more on the way
Every label says exactly where each one stands. Anything that can send a web request can make a PDF right now.
- ZapierBuilt and submitted for reviewIn review
- MakeBuilt and submitted for reviewIn review
- AirtableOn the roadmapPlanned
- Google SheetsOn the roadmapPlanned
- ShopifyOn the roadmapPlanned
- WooCommerceOn the roadmapPlanned
- HubSpotOn the roadmapPlanned
- NotionOn the roadmapPlanned
- StripeOn the roadmap. A how-to guide works todayPlanned
- Available live today
- In review built, waiting for marketplace approval
- Planned on the roadmap, no date
Product names and logos are trademarks of their owners, used only to identify compatible products. No endorsement is implied.
One request. Your template ID and your data.
- SDKs, or none at all. Official clients for Node.js and Python, or any HTTP client: the whole API is described in OpenAPI 3.1.
- Safe retries. Send an Idempotency-Key and a repeat never makes or bills a second PDF.
- Clear errors. A template error names the line and column, and every code links to its fix.
Use it from your code or your AI agent
Popular guides: repeat a table header, page breaks that look right and an invoice PDF from JSON. Or compare the best PDF generation APIs, and see what is new in the changelog. No code yet? Try the free PDF tools, such as the HTML to PDF converter and the invoice generator.
curl https://api.castpdf.com/v1/pdf \
-H "Authorization: Bearer $CASTPDF_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: invoice-INV-2026-0142" \
-d '{
"template_id": "8d1f2c3b-4a5e-4f60-9b7a-1c2d3e4f5a6b",
"data": { "customer": { "name": "Brightwater Coffee Co. Ltd" } },
"response": "url"
}'const res = await fetch('https://api.castpdf.com/v1/pdf', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CASTPDF_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': 'invoice-INV-2026-0142',
},
body: JSON.stringify({
template_id: '8d1f2c3b-4a5e-4f60-9b7a-1c2d3e4f5a6b',
data: { customer: { name: 'Brightwater Coffee Co. Ltd' } },
response: 'url',
}),
});
const { url, expires_at } = await res.json();import os, requests
res = requests.post(
"https://api.castpdf.com/v1/pdf",
headers={
"Authorization": f"Bearer {os.environ['CASTPDF_API_KEY']}",
"Idempotency-Key": "invoice-INV-2026-0142",
},
json={
"template_id": "8d1f2c3b-4a5e-4f60-9b7a-1c2d3e4f5a6b",
"data": {"customer": {"name": "Brightwater Coffee Co. Ltd"}},
"response": "url",
},
timeout=60,
)
print(res.json()["url"])<?php
$client = new GuzzleHttp\Client(['timeout' => 75]);
$response = $client->post('https://api.castpdf.com/v1/pdf', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CASTPDF_API_KEY'),
'Idempotency-Key' => 'invoice-INV-2026-0142',
],
'json' => [
'template_id' => '8d1f2c3b-4a5e-4f60-9b7a-1c2d3e4f5a6b',
'data' => ['customer' => ['name' => 'Brightwater Coffee Co. Ltd']],
'response' => 'url',
],
]);
echo json_decode((string) $response->getBody())->url;EU e-invoices from one JSON invoice
Send the invoice in e_invoice on POST /v1/pdf. Get a Factur-X or ZUGFeRD PDF/A-3 with the XML inside, or an XRechnung XML for German public buyers. We compute the totals with the EN 16931 rules, so the PDF and the XML always agree.
- Factur-X
- ZUGFeRD
- XRechnung (CII)
- XRechnung (UBL)
- PDF/A-3b
Start free. Pay per PDF, never per page.
Launch offer: 30% off your first year on any yearly plan. Use code LAUNCH30 at checkout.
Free
$0
Try everything, free.
- 100 PDFs a month
- Unlimited test PDFs (watermarked)
- 5 templates
- Download links last 1 day
- Small “Made with CastPDF” line on live PDFs
- Most popular
Growth
$49a month
For a business that sends PDFs every day.
- 10,000 PDFs a month
- Unused PDFs roll over
- 100 templates
- Download links last 30 days
- Extra PDFs $6.00 per 1,000
- Your brand only, no CastPDF line
Pro
$129a month
For high volume, at a lower price per PDF.
- 50,000 PDFs a month
- Unused PDFs roll over
- Unlimited templates (fair use)
- Download links last 90 days
- Extra PDFs $3.50 per 1,000
- Your brand only, no CastPDF line
Need less or more? Starter from $15 a month, Scale for 200,000 PDFs.Compare all plans
Good to know
What is CastPDF?
How much does CastPDF cost?
Is there a free plan?
Do I need to code?
What counts as one PDF?
Is CastPDF GDPR compliant?
How is CastPDF different from PDFMonkey or APITemplate?
Can I use my own design?
Your first PDF in five minutes.
Pick a template, create a free test key and send one request. 100 PDFs a month are free, and you never need a card to start.