Getting Started

Authenticate and send your first request

Every FastPDF request requires an API key in the X-API-Key header. Follow the steps below to get a key and make your first conversion.

1
key

Create an API key

Go to your Dashboard → API Keys page and click New API Key. Copy and save the key — it's only shown once.

2
lock

Include it in every request

Pass the key as the X-API-Key HTTP header on all conversion requests. There is no Bearer prefix or OAuth flow — just the raw key value.

3
arrow_forward

Continue with an endpoint

For endpoint-specific request bodies, continue with Convert HTML to PDF or Convert URL to PDF.

lightbulb

Keep your API key out of version control. Store it in an environment variable — FASTPDF_API_KEY is a good name.

Quick start

POST/v1/convert/html
cURL
curl -X POST https://api.fastpdf.dev/v1/convert/html \  -H "X-API-Key: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{  "html": "<h1>Hello, World!</h1>",  "config": {    "paper": { "width": "8.5in", "height": "11in" },    "margin": { "top": "1in", "bottom": "1in" },    "print_background": true  }}' \  --output document.pdf

HTML endpoint examples

POST/v1/convert/html
curl -X POST https://api.fastpdf.dev/v1/convert/html \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "html": "<h1>Hello, World!</h1>", "config": { "paper": { "width": "8.5in", "height": "11in" }, "margin": { "top": "1in", "bottom": "1in" }, "print_background": true }}' \ --output document.pdf
{ "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago..."}