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โ
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โ
- Go to https://app.podpdf.com/signup
- Create your account with email and password
- Verify your email address
Get Your API Key from Dashboardโ
- Sign in to your dashboard
- Navigate to Settings โ API Keys
- Click Create New Key if you don't have one
- Copy your API key (shown only once)
API keys are only displayed once when created. Save it immediately! If you lose it, create a new one from the dashboard.
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.
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_idback) - โ 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โ
- ๐ View All API Endpoints
- ๐ฆ Convert many files at once
- ๐จ See More Code Examples
- ๐ All limits in one place
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-Keyheader - 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
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!