v2.0 is now live

Developer-grade
PDF Generation

Build templates with HTML/CSS and hook into your data pipelines with a professional console interface. No drag-and-drop nonsense. Just code.

Start Building Free
> npm i @hookpdf/sdk
curl -X POST "https://api.hookpdf.com/render" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "<template_id>",
    "payload": {
      "key1": "text1",
      "key2": "text2"
    }
  }'
const response = await fetch('https://api.hookpdf.com/render', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <api_key>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    template_id: '<template_id>',
    payload: {
      key1: 'text1',
      key2: 'text2'
    }
  })
});
import requests

url = "https://api.hookpdf.com/render"
headers = {
    "Authorization": "Bearer <api_key>",
    "Content-Type": "application/json"
}
data = {
    "template_id": "<template_id>",
    "payload": {
        "key1": "text1",
        "key2": "text2"
    }
}

response = requests.post(url, json=data, headers=headers)
$ch = curl_init('https://api.hookpdf.com/render');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer <api_key>',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'template_id' => '<template_id>',
    'payload' => [
        'key1' => 'text1',
        'key2' => 'text2'
    ]
]));
$response = curl_exec($ch);
curl_close($ch);
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = 
    new AuthenticationHeaderValue("Bearer", "<api_key>");

var data = new {
    template_id = "<template_id>",
    payload = new { key1 = "text1", key2 = "text2" }
};

var response = await client.PostAsJsonAsync(
    "https://api.hookpdf.com/render", 
    data
);
$headers = @{
    "Authorization" = "Bearer <api_key>"
    "Content-Type" = "application/json"
}
$body = @{
    template_id = "<template_id>"
    payload = @{
        key1 = "text1"
        key2 = "text2"
    }
} | ConvertTo-Json -Depth 3

Invoke-RestMethod -Uri "https://api.hookpdf.com/render"
    -Method Post -Headers $headers -Body $body

Built for scale

Everything you need to automate document workflows.

REST API First

A clean, well-documented API that integrates with any language. Node, Python, Go, or PHP.

HTML Templates

Forget proprietary drag-and-drop tools. Write standard HTML/CSS for pixel-perfect PDFs.

Secure by Design

Enterprise-grade security with SOC2 compliance, encrypted data storage, and granular access keys.

HTML to PDF API

Stop wrestling with PDF libraries.

Build templates visually, populate them via API. The developer-first PDF engine designed to save you hours of CSS print-media frustration.

Pixel-perfect rendering engine
Support for modern CSS (Flexbox, Grid)
Async generation for high volume
invoice.html
<div class="invoice-box">
  <h1>Invoice #{{id}}</h1>
  <table>
    {{#each items}}
    <tr>
      <td>{{name}}</td>
      <td>{{price}}</td>
    </tr>
    {{/each}}
  </table>
</div>

Three steps to perfect PDFs

Our pipeline is designed to be invisible. You send data, we send back a document.

1. Create Template
template.html
<html>
  <body>
    <h1>{{title}}</h1>
    <p>Name: {{name}}</p>
    <p>Date: {{date}}</p>
  </body>
</html>
API
POST
2. Send JSON Data
{} data.json Valid
{
  "title": "Welcome",
  "name": "John Doe",
  "date": "05.01.2026"
}
title name date
Process
3. Create PDF
PDF generated.pdf

Welcome

Name: John Doe

Date: 05.01.2026

Simple, Credit-Based Pricing

1 page = 1 credit. Select your monthly needs.

Select your monthly page needs

500
50 500 2,500 25,000 More
I'll need to convert pages* per month

* Most documents are 1–5 pages. Large documents may consume additional credits.

All features included:

  • HTML/CSS Templates
  • REST API Access
  • Dynamic Data Binding
  • Async Generation
  • Webhook Delivery
  • Modern CSS Support

* We count 1 credit per page. For example, a 5-page PDF will consume 5 credits.

Ready to automate your documents?

Join 2,000+ developers generating PDFs with HookPDF today.

Get Your API Key