On this pageAsync jobs
Async jobs
Aly Sawft · Founder & Engineer, Sawftware LLC ·
When should I use async jobs?
Queue POST /v1/extract with store=true for large PDFs or batch processing. Poll GET /v1/jobs/{job_id} until status=complete, then retrieve bundle_id. Async avoids gateway timeouts on multi-minute extracts.
How do I poll an async extract job?
POST returns 202 with job_id. Poll GET /v1/jobs/{job_id} every 2–5 seconds. On complete, response includes bundle_id and manifest_sha256. Failed jobs return structured error codes without charging credits.
Can async jobs create evidence bundles?
Yes. Async jobs with store=true produce the same evidence bundle structure as sync extracts — manifest SHA-256, artifact hashes, and free verify/download endpoints once complete.
Async jobs
$0.075Async extract and batch processing with webhook progress. Poll GET /v1/jobs/{id}. Stored evidence bundles (store=true, the default) return 202 with a job_id unless you pass ?sync=true for inline processing. Large PDFs, batch ingest, and explicit ?async=true also queue work. Webhooks fire on progress, completion, and failure. Use POST /v1/jobs for multi-document batches. Focused endpoints (/v1/summarize, /v1/qa, etc.) stay synchronous by default and accept optional ?async=true — the full result lands in the job response, no bundle fetch needed.
Default async: POST /v1/extract with store=true → 202 + poll GET /v1/jobs/:id.
Synchronous bundle: add ?sync=true when you need an immediate 200 + bundle_id (best for small pages; large PDFs may time out).
Polling: every 2–5s until status: "complete" or "failed".
POST /v1/jobs$0.075Queue multi-item extract jobs with webhook progress.
GET /v1/jobs/{id}FreeProgress, result, and error for async work.
# Stored extract is async by default (202 + job_id)
curl -X POST https://api.docimprint.com/v1/extract \
-H "Content-Type: application/json" \
-H "X-Payment: <token>" \
-d '{"source": "https://example.com/report.pdf", "webhook": "https://myapp.com/hooks/docimprint"}'
# Explicit async (same as default for store=true)
curl -X POST "https://api.docimprint.com/v1/extract?async=true" \
-H "Content-Type: application/json" \
-H "X-Payment: <token>" \
-d '{"source": "https://example.com/report.pdf"}'
# Synchronous bundle when you need inline bundle_id
curl -X POST "https://api.docimprint.com/v1/extract?sync=true" \
-H "Content-Type: application/json" \
-H "X-Payment: <token>" \
-d '{"source": "https://example.com/page.html"}'
# Batch job — multiple sources
curl -X POST https://api.docimprint.com/v1/jobs \
-H "Content-Type: application/json" \
-H "X-Payment: <token>" \
-d '{
"items": [{ "source": "https://example.com/a.pdf" }],
"mode": "extract",
"webhook": "https://myapp.com/hooks/docimprint"
}'
# Poll progress
curl https://api.docimprint.com/v1/jobs/job_abc123{
"job_id": "job_abc123",
"status": "processing",
"progress_pct": 60,
"progress_message": "OCR page 3/12",
"bundle_id": "ev_xyz"
}Async extract from the playground: Extract guide →