Skip to main content

Getting Started

Generate your first PDF with PodPDF in under 5 minutes!

What You'll Buildโ€‹

By the end of this guide, you'll be able to:

  • โœ… Get your PodPDF API key
  • โœ… Generate your first PDF from HTML
  • โœ… Understand which endpoint to use
  • โœ… Customize PDF options

Prerequisitesโ€‹

  • A valid email address
  • cURL or any HTTP client
  • Basic knowledge of REST APIs

Step 1: Get Your API Keyโ€‹

Sign in first

Your first key comes from the dashboard. Once you have a signed-in session you can also create and revoke keys through the API key endpoints โ€” they require a Cognito token, not an API key.

Sign Upโ€‹

  1. Go to https://app.podpdf.com/signup
  2. Create your account with email and password
  3. Verify your email address

Get Your API Key from Dashboardโ€‹

  1. Sign in to your dashboard
  2. Navigate to Settings โ†’ API Keys
  3. Click Create New Key if you don't have one
  4. Copy your API key (shown only once)
One-Time Display

API keys are only displayed once when created. Save it immediately! If you lose it, create a new one from the dashboard.

Store Securely

Keep your API key secure! Store it in environment variables, not in your code.

Step 2: Generate Your First PDFโ€‹

Now let's create a simple PDF from HTML:

curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"input_type": "html",
"html": "<h1>My First PDF</h1><p>This is amazing!</p>"
}' \
--output my-first.pdf

Success! ๐ŸŽ‰ You now have my-first.pdf on your computer.

Prefer a GUI?

Download the Postman collection from the PodPDF home page. Import it, paste your key into the api_key variable, and every endpoint on this site is ready to send โ€” the convert requests even fill in job_id for the job lookups.

Step 3: Try Markdownโ€‹

You can also generate PDFs from Markdown:

curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"input_type": "markdown",
"markdown": "# My Report\n\n## Section 1\n\nThis is **bold** and this is *italic*."
}' \
--output my-markdown.pdf

Step 4: Customize Optionsโ€‹

Add custom margins and formatting:

curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"input_type": "html",
"html": "<h1>Custom PDF</h1><p>With custom margins!</p>",
"options": {
"format": "A4",
"margin": {
"top": "20mm",
"right": "20mm",
"bottom": "20mm",
"left": "20mm"
},
"printBackground": true,
"landscape": false
}
}' \
--output custom.pdf

Step 5: Generate an Invoiceโ€‹

Here's a practical example - generating an invoice:

curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"input_type": "html",
"html": "<!DOCTYPE html><html><head><style>body{font-family:Arial;padding:40px}.header{border-bottom:2px solid #333;padding-bottom:20px}.invoice-details{margin:30px 0}.total{font-size:24px;font-weight:bold;text-align:right}</style></head><body><div class=\"header\"><h1>INVOICE</h1><p>Invoice #12345<br>Date: Dec 29, 2025</p></div><div class=\"invoice-details\"><p><strong>Bill To:</strong><br>John Doe<br>john@example.com</p><table width=\"100%\" style=\"margin-top:30px;border-collapse:collapse;\"><tr style=\"border-bottom:1px solid #ddd;\"><th align=\"left\">Description</th><th align=\"right\">Amount</th></tr><tr><td>PDF Generation Service</td><td align=\"right\">$100.00</td></tr></table></div><div class=\"total\">Total: $100.00</div></body></html>"
}' \
--output invoice.pdf

Choosing Between QuickJob, LongJob and BulkJobโ€‹

Use /quickjob when:โ€‹

  • โœ… Document is simple and small (up to 25 pages maximum)
  • โœ… Need PDF immediately (< 30 seconds, returned in the response body)
  • โœ… Synchronous workflow fits your needs
  • โœ… Converting images to PDF (up to 25 images maximum)

Use /longjob when:โ€‹

  • โœ… Document is large (more than 25 pages, up to 100)
  • โœ… Can wait for generation (async โ€” you get a job_id back)
  • โœ… Want webhook notifications when complete

Use /bulkjob when:โ€‹

  • โœ… You have many documents to convert in one request
  • โœ… Files ship as a ZIP (with shared CSS/images) or as a list of uploads
  • โœ… You want one output ZIP of PDFs plus a manifest.json
  • โœ… Up to 200 pages total per job; only successful files are charged

LongJob reference โ†’ ยท BulkJob reference โ†’ ยท Bulk conversion guide โ†’

Using Environment Variablesโ€‹

For security, store your API key in environment variables:

Linux/Macโ€‹

export PODPDF_API_KEY="your_api_key_here"

curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: $PODPDF_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input_type":"html","html":"<h1>Hello</h1>"}' \
--output output.pdf

Node.jsโ€‹

Create a .env file:

PODPDF_API_KEY=your_api_key_here

Use in your code:

require('dotenv').config();

const apiKey = process.env.PODPDF_API_KEY;

fetch('https://api.podpdf.com/quickjob', {
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json'
}
});

What's Next?โ€‹

Explore More Featuresโ€‹

Common Use Casesโ€‹

  • Generate customer invoices
  • Create PDF reports from data
  • Issue certificates and credentials
  • Convert blog posts to PDF

Need Help?โ€‹

Limitsโ€‹

PodPDF charges per PDF generated. Pay with an optional monthly subscription, one-off credit packs, or both โ€” see Plans & Billing.

  • ๐Ÿ’ณ $0.01 per PDF - Only successful conversions are charged
  • ๐Ÿ“… Monthly plans - Starter (2,000 PDFs for $20) or Business (10,000 PDFs for $100), used before one-off credits
  • ๐Ÿ“„ Up to 25 pages - Per instant conversion (100 with /longjob, 200 per bulk job)
  • ๐Ÿ“ฆ 5 MB max - Input size limit
  • โšก No per-account rate limit - On the standard paid plan

See Limits for the complete list.

Troubleshootingโ€‹

Error: 401 Unauthorizedโ€‹

  • Check that your API key is correct
  • Make sure you're using the X-API-Key header
  • Verify your key hasn't been revoked

Error: 402 Upgrade Requiredโ€‹

  • The account has no plan yet (an account that has not finished setting up)
  • Sign in to the dashboard once, or buy a credit pack or start a subscription, to activate it

Error: 403 Insufficient Creditsโ€‹

  • Your free PDFs, subscription allowance and credits cannot cover another PDF
  • Buy a credit pack or upgrade your plan in your dashboard

Error: 408 Timeoutโ€‹

  • Your document is too large for QuickJob
  • Use LongJob instead

More troubleshooting โ†’

Congratulations! ๐ŸŽ‰โ€‹

You've successfully:

  • โœ… Got your API key
  • โœ… Generated your first PDF
  • โœ… Learned the basics
  • โœ… Created a real invoice

Start building amazing PDF generation features into your app!