Skip to main content

Quickstart

This guide will walk you through generating your first PDF with Pdflet.

Prerequisites

Step 1: Get Your API Key

1

Sign Up

Create a free account at pdflet.dev/signup
2

Go to API Keys

Navigate to Dashboard → API Keys
3

Create a Key

Click Create API Key, give it a name, and copy the key
Your API key is only shown once. Store it securely - you’ll need it for all API requests.

Step 2: Make Your First Request

Convert a simple HTML string to PDF:
curl -X POST https://api.pdflet.dev/api/v1/pdf/ \
  -H "X-API-Key: pk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<html><body><h1>My First PDF</h1><p>Generated with Pdflet!</p></body></html>"
  }'

Step 3: Check Conversion Status

PDF generation is asynchronous. Poll the conversion endpoint to check status:
curl https://api.pdflet.dev/api/v1/conversions/conv_abc123/ \
  -H "X-API-Key: pk_live_your_api_key"

Step 4: Download Your PDF

Once the status is completed, the response includes a file_url. Download your PDF:
curl -O "https://api.pdflet.dev/media/pdfs/conv_abc123.pdf"

Next Steps