Quickstart

Base URL https://getpdf.dev · Auth Authorization: Bearer df_…

The API is on the same host as this site. A free key allows 100 documents per month. Browser time is a shared 10 minutes per day. Paid plans are available as a 3-day free trial, then $12 for 3,000 docs, $39 for 15,000, or $79 for 50,000 per month until cancelled. You can also try a built-in invoice, receipt, or certificate with no key at Try it free. The paid-interest form does not create a key.

① Get a key② POST /v1/render③ Save the PDF

POST/v1/render

curl -X POST https://getpdf.dev/v1/render -H "Authorization: Bearer $KEY" \
  -H 'content-type: application/json' \
  -d '{"template_id":"invoice","data":{"number":"INV-1","currency":"$",
       "items":[{"description":"Work","qty":2,"price":50}]},
       "options":{"format":"A4","landscape":false}}' -o invoice.pdf

template_id | template | htmldata {}format: A4 · Letter · Legallandscape↩ x-docforge-usage

Templates

invoice
invoice
receipt
receipt
certificate
certificate
report
report
letter
letter
GET/v1/templates
POST/v1/templates { id, name, source, sample }
GET/v1/templates/:id
PUT/v1/templates/:id
DELETE/v1/templates/:id
GET/v1/usage

{{money v currency}}{{mul a b}}{{sum items "qty" "price"}}50 templates / keysource ≤ 256 KBprivate to your key

Use from AI agents (MCP)

A hosted remote MCP endpoint is live at https://getpdf.dev/mcp. It uses Streamable HTTP (JSON-RPC over POST, with an optional SSE response). Authenticate with the same getpdf API key as the REST API:

Authorization: Bearer df_YOUR_API_KEY

The same monthly quota, size limits (2 MB in, 20 MB out, template source ≤ 256 KB, 20 seconds per render), sandbox, and SSRF protections as POST /v1/render apply. Quota is counted only on a successful render. Rendered PDFs are not stored; they are returned inline as a base64 application/pdf embedded resource.

list_templatesrender_pdfsame keys as /v1/renderquota on success onlynever stored

Tools

  • list_templates — built-in templates and their fields, plus any custom templates saved on the key.
  • render_pdf — a template_id or inline Handlebars/HTML template (or html), plus JSON data. Optional format (A4, Letter, Legal) and landscape.

There is no published npm or GitHub package. Do not run npx -y getpdf-mcp.

Cursor

Add this to ~/.cursor/mcp.json, or via Cursor Settings → MCP:

{
  "mcpServers": {
    "getpdf": {
      "url": "https://getpdf.dev/mcp",
      "headers": {
        "Authorization": "Bearer df_YOUR_API_KEY"
      }
    }
  }
}

Claude Desktop

The same remote URL and header. If the app has Settings → Connectors (or Add custom connector), use https://getpdf.dev/mcp and attach the Bearer header. You can also put this in claude_desktop_config.json:

{
  "mcpServers": {
    "getpdf": {
      "url": "https://getpdf.dev/mcp",
      "headers": {
        "Authorization": "Bearer df_YOUR_API_KEY"
      }
    }
  }
}

If the connector UI cannot send a header, use the mcp-remote bridge (a local stdio proxy, not a getpdf package):

{
  "mcpServers": {
    "getpdf": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://getpdf.dev/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer df_YOUR_API_KEY"
      }
    }
  }
}

Security

🧪 fresh context / render🚫 JS off by default🛡 SSRF guard: localhost · private IPs · 169.254.169.254 · file:// blocked🗑 PDFs never stored⏱ 2 MB in · 20 MB out · 20 s

Errors

400bad input
401bad key
402quota reached
403read-only / limit
404unknown template
409id conflict
413too large
504timeout

Failed renders don't count toward your quota.