Quickstart
Your first PDF in about 60 seconds, then the production pattern. You need an API key — create one in the dashboard (a card is verified at key creation and never charged on the Free plan).
1. Your first PDF in 60 seconds (training wheels)
Submit a URL, poll the status, download the file. Fine for trying things out — the production pattern comes next.
curl -X POST https://api.pdfik.net/url-to-pdf \
-H "X-API-Key: sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'
The API answers 202 Accepted immediately — rendering happens asynchronously:
{
"job_id": "9b2f6c1e-4a7d-4f0e-b2c9-1d8e5a3f7b21",
"status": "queued",
"detail": "Job successfully sent to processing queue."
}
Poll the job until it is done:
curl https://api.pdfik.net/jobs/9b2f6c1e-4a7d-4f0e-b2c9-1d8e5a3f7b21 \
-H "X-API-Key: sk_live_YOUR_KEY"
{
"status": "done",
"created_at": "2026-08-04T12:00:01Z",
"finished_at": "2026-08-04T12:00:04Z",
"expires_at": "2026-08-05T12:00:04Z",
"test": false,
"pages_count": 1
}
Then download it:
curl -o my-first.pdf \
https://api.pdfik.net/jobs/9b2f6c1e-4a7d-4f0e-b2c9-1d8e5a3f7b21/download \
-H "X-API-Key: sk_live_YOUR_KEY"
Two limits worth knowing from day one: a finished file is downloadable for
24 hours (expires_at tells you exactly when it stops), and each file
allows 3 download attempts with one active stream at a time — see
Rate Limits for the full list.
2. The production pattern: webhooks
Polling wastes requests and adds latency. In production you pass a
webhook_url and forget about the job — PDFik POSTs you a signed notification
when the PDF is ready:
curl -X POST https://api.pdfik.net/url-to-pdf \
-H "X-API-Key: sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/invoice/42",
"webhook_url": "https://your-app.com/hooks/pdfik"
}'
Your endpoint receives a JSON notification (not the file itself):
{
"job_id": "9b2f6c1e-4a7d-4f0e-b2c9-1d8e5a3f7b21",
"status": "done",
"test": false,
"file_url": "https://api.pdfik.net/jobs/9b2f6c1e-4a7d-4f0e-b2c9-1d8e5a3f7b21/download",
"pages_count": 2,
"finished_at": "2026-08-04T12:00:04Z",
"expires_at": "2026-08-05T12:00:04Z"
}
Delivery is retried on a 2/5/15/30/60-second ladder (6 attempts in total) and
then parked in a dead-letter queue — a lost callback is an incident on our
side, not silence on yours. Every delivery carries X-PDFik-Signature
(HMAC-SHA256) and X-PDFik-Timestamp headers — verify them with a few lines
of code, see Webhooks & Signatures.
3. Fetch the file into your own storage
PDFik is a delivery pipeline, not a file archive: generated documents are deleted after 24 hours. The robust production loop is therefore:
- Receive the webhook.
GETthefile_urlonce.- Store the PDF in your own storage (S3, GCS, database — anywhere).
This makes the 24-hour window and the 3-attempt limit irrelevant to your architecture — and it is the pattern our own SDKs encourage.
4. Next
- Convert HTML to PDF — render your own markup instead of a URL.
- PDF & Browser Options — page size, margins, headers/footers, watermarks, compression.
- Testing —
"test": trueruns the full pipeline without a render, ideal for CI and integration tests. - SDKs — Node, Python and Java clients, plus the OpenAPI specification for generating your own.