Testing
PDFik has a built-in test mode for verifying your integration — job submission, status polling, webhooks, signature verification, and downloads — without waiting for a real render.
Test Mode ("test": true)
Add "test": true to the request body of either conversion endpoint:
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",
"webhook_url": "https://your-app.com/hooks/pdfik",
"test": true
}'
| Parameter | Type | Required | Description |
|---|---|---|---|
test | boolean | No | When true, the job runs through the full pipeline but skips the actual browser render. Defaults to false. |
The same field works on POST /html-to-pdf.
What Test Mode Does
A test job exercises the real production pipeline end to end:
- The job is validated, queued, and picked up by a worker exactly like a live job.
- The worker skips the Chromium render and completes the job immediately.
- The job status transitions
queued→done, your webhook fires with a signed payload, and a usage event is recorded — all through the same code paths as a real render. - Downloading the result returns a sample PDF (
pdfik.pdf, a small reference document), not a render of your input.
What test mode is for: verifying authentication, request validation, webhook delivery and signature verification, polling logic, and download handling. What it is not for: checking how your page actually renders — submit a real job for that.
Test Mode Is Free
Test jobs do not consume your quotas — nothing renders, so nothing is billed:
- Your monthly PDF quota is not debited.
- Your monthly generated-volume (GB) quota is not debited.
- Instead, test submissions have their own abuse brake: 60 test calls per
minute and 2,000 per day per account. Exceeding either returns
429test-rate-limit-exceeded with aRetry-Afterheader. - Job concurrency limits apply unchanged; the dashboard shows a separate "test calls this month" counter.
The test Field in Responses
Every job status response and every webhook payload carries a test boolean (similar
to Stripe's livemode), so your receiver can always tell test traffic from live
traffic:
{
"job_id": "8bfa5cc3-09ef-436f-80d4-a0eb867123aa",
"status": "done",
"file_url": "https://api.pdfik.net/jobs/8bfa5cc3-09ef-436f-80d4-a0eb867123aa/download",
"pages_count": 1,
"finished_at": "2026-08-04T10:15:00Z",
"expires_at": "2026-08-05T10:15:00Z",
"test": true
}
Downloads Work the Same Way
The download endpoint applies the same rules to test jobs as to live jobs:
- The file is available for 24 hours after generation (
expires_at); afterwards the endpoint returns410file-expired. - Maximum 3 download attempts per file — exceeding them returns
429download-attempts-exhausted — and 1 active stream at a time; a concurrent duplicate is rejected with429download-busy without consuming an attempt.
See Rate Limits & Quotas for the full list of plan limits.