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
  }'
ParameterTypeRequiredDescription
testbooleanNoWhen 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:

  1. The job is validated, queued, and picked up by a worker exactly like a live job.
  2. The worker skips the Chromium render and completes the job immediately.
  3. 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.
  4. 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 429 test-rate-limit-exceeded with a Retry-After header.
  • 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 returns 410 file-expired.
  • Maximum 3 download attempts per file — exceeding them returns 429 download-attempts-exhausted — and 1 active stream at a time; a concurrent duplicate is rejected with 429 download-busy without consuming an attempt.

See Rate Limits & Quotas for the full list of plan limits.