Send HTML or a URL. Receive a production-quality PDF. No infrastructure to manage.
HTML2DocHub is a fully managed PDF generation API powered by Chromium. Generate invoices, reports, contracts, and tickets at scale. Pay only per page rendered — no monthly minimums, no per-seat pricing. Trusted by developers across fintech, e-commerce, and SaaS.
curl -X POST https://api.html2dochub.com/v1/jobs \
-H "X-API-Key: sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"type": "pdf",
"html": "<h1>Annual Report 2025</h1><p>Revenue: $4.2M</p>",
"options": { "format": "A4", "margin": "10mm" }
}'import requests, base64
pdf_html = open("invoice.html").read()
resp = requests.post(
"https://api.html2dochub.com/v1/jobs",
headers={"X-API-Key": "sk_live_your_key"},
json={"type": "pdf", "html": pdf_html, "options": {"format": "A4"}},
)
print(resp.json()["download_url"]) # signed URL, valid 1 hourimport axios from "axios";
const { data } = await axios.post(
"https://api.html2dochub.com/v1/jobs",
{ type: "pdf", url: "https://myapp.com/invoice/456", options: { format: "A4" } },
{ headers: { "X-API-Key": "sk_live_your_key" } }
);
console.log(data.download_url); // Ready in < 2sPay only for pages rendered. No subscriptions. No minimum monthly fee.
Free account. No credit card required. API ready in minutes.
Get your free API key