guide
Async jobs
Some operations — OCR on a 500-page scan, compression with max re-encoding, batch workflows — take longer than a synchronous HTTP response window. For these, SnapPDF offers an async queue with webhook completion events.
When to use async
- OCR on PDFs with 100+ pages at high DPI.
- Compression at
level=maxon 50+ MB files. - Any pipeline you want to retry independently of the HTTP request.
Flow
- 1. Set
X-SnapPDF-Async: trueon your request. - 2. Response is
202 Acceptedwith ajob_id. - 3. Poll
GET /api/v1/jobs/{id}OR subscribe to theoperation.completedwebhook. - 4. Download the output via the pre-signed URL returned in the event.
Retention
Job artifacts live in S3 for 24 hours, then purge. Copy to your own storage before expiry.