Quick Start
Minimal examples to get you started fast.
Generate 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>Hello</h1>"}' \
--output output.pdf
Generate PDF 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":"# Hello\n\nWorld"}' \
--output output.pdf
Generate PDF from a URL
curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"input_type":"url","url":"https://example.com/invoice.html"}' \
--output output.pdf
Public HTTPS URLs only. The page is fetched server-side, so relative assets on it do not resolve — see URL fetching.
Generate PDF from Images
# Single image
curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: your_api_key_here" \
-F "input_type=image" \
-F "images=@photo.jpg" \
--output photo.pdf
# Multiple images
curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: your_api_key_here" \
-F "input_type=image" \
-F "images=@photo1.jpg" \
-F "images=@photo2.jpg" \
-F 'options={"format":"A4","fit":"contain"}' \
--output album.pdf
With Custom Options
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>",
"options": {
"format": "A4",
"margin": {"top":"20mm","right":"20mm","bottom":"20mm","left":"20mm"},
"landscape": false
}
}' \
--output custom.pdf
Convert Many Files at Once (Bulk)
Send the files and get a ZIP of PDFs back. For a small batch, multipart is the shortest path:
curl -X POST https://api.podpdf.com/bulkjob \
-H "X-API-Key: your_api_key_here" \
-F bundle_type=html \
-F 'paths=["reports/january.html","reports/css/site.css"]' \
-F files=@january.html \
-F files=@css/site.css
Larger batches go through a presigned ZIP upload — see the guide below.
You get a job_id back. Poll it and download the output ZIP when it's done:
curl https://api.podpdf.com/jobs/JOB_ID \
-H "X-API-Key: your_api_key_here"
curl https://api.podpdf.com/jobs/JOB_ID/download \
-H "X-API-Key: your_api_key_here"
Keep the PDF for Later
Add "store": true and you get JSON with a signed download URL instead of the binary:
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>Hello</h1>","store":true}'
The link is valid for one hour; the file is kept for 30 days and you can reissue the link from GET /jobs/{job_id}/download.
Using Environment Variables
# Set your API key
export PODPDF_API_KEY="your_api_key_here"
# Use it in requests
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