Documents in. Validated JSON out.
Repeated extractions of the same document shape. Save a template once, run it
against thousands of files, get back JSON that matches your database schema.
For one-off extractions, pass an inline extraction_schema instead.
Five stages. One job.
- 1Stage 01 · Submit
POST /extractwith the filename, MIME type, size, and either atemplate_idor an inlineextraction_schema. Returns ajob_id,artifact_id, and a presignedupload_urlvalid for one hour. - 2Stage 02 · Upload
PUTthe file bytes to theupload_url. The upload goes directly to S3; your bytes never traverse the API server. - 3Stage 03 · Confirm
POST /artifacts/{artifact_id}/confirm-upload. The backend does not watch S3 — this call is what flips the artifact touploaded, queues the job, and dispatches the worker. - 4Stage 04 · Process
A worker pulls the file, runs the extraction pipeline against your template or schema, and writes the result. Billed by actual compute time, not by file size or page count.
- 5Stage 05 · Receive
GET /job/{job_id}untilstatus == success, or register a webhook to receive a signedextraction.completedpush the moment the job finishes.
Built end-to-end.
/extractand/batch: single-file and up-to-50-file submissions- Templates with versioned schema definitions, clones, patches, and field-level validation
- Inline
extraction_schemafor ad-hoc, one-shot field definitions - Signed webhooks with HMAC-SHA256, idempotency keys, retry logs, and 24h secret rotation
- Lightweight status endpoint for high-frequency polling
- Wallet + usage endpoints for live spend tracking
- Retention policies from
immediatetonever, per-artifact - Cancel and rerun for in-flight or completed jobs
Pick the one that matches your shape.
One file at a time
The /extract endpoint, polled with /job. The default for sync-feeling integrations.
→Many files at once
The /batch endpoint. Up to 50 files per submit, one webhook covers them all.
→Push, not poll
Register a webhook once, stop polling, get a signed payload when the job completes.
→Save your schema
Define fields, validation, OCR settings once. Reuse the template_id forever.
→HTTP Basic with API key + secret.
Authorization: Basic … header. The username is your API key, the password is its secret. Rotate either one without redeploying.curl https://api.datadistillers.com/api/v1/wallet \ -u 'dk_live_…:sk_…'
See Authentication for key rotation, scoping, and the security model.