Documentation

Quickstart

Generate your first PDF in under a minute. You'll need a PDFend account and a pk_live_… API key.

1. Get an API key

Sign up at /sign-up and create an API key in the dashboard. Copy the key — it is shown once.

2. Make your first request

bashexample
curl -X POST https://api.pdfend.com/v1/generate \
  -H "Authorization: Bearer pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<h1>Hello, PDFend!</h1><p>This is my first PDF.</p>",
    "options": { "format": "A4" }
  }'

Response:

jsonexample
{
  "id": "pdf_abc123",
  "status": "completed",
  "url": "https://files.pdfend.com/pdf_abc123.pdf",
  "pages": 1,
  "size": 45230,
  "duration_ms": 1180
}

3. Try the TypeScript SDK

bashexample
npm install @pdfend/sdk
typescriptexample
import { PDFend } from "@pdfend/sdk";

const pdfend = new PDFend(process.env.PDFEND_API_KEY!);

const { url } = await pdfend.generate({
  html: "<h1>Invoice #1042</h1>",
  options: { format: "A4", printBackground: true },
});

console.log(url);

4. Try the Python SDK

bashexample
pip install pdfend
pythonexample
from pdfend import PDFend

client = PDFend("pk_live_...")

result = client.generate(
    html="<h1>Invoice #1042</h1>",
    options={"format": "A4", "print_background": True},
)

print(result["url"])

Next

Learn about templates, async mode, or the MCP server for AI agents.