Invoice extraction API
Extract typed invoice fields with source citations, review limitations and bounded HQ-credit costs.
Structured invoice fields#
Use pdfhq.ai.extract. Result.data has invoice_number, supplier, customer, issue_date, due_date, currency and total (string or null), with field_citations for each non-null field. Dates require ISO YYYY-MM-DD, currency three uppercase letters and totals decimal strings. These are model suggestions for review, rather than verified accounting facts.
POST https://api.pdfhq.io/v1/ai/jobs
x-api-key: PROJECT_API_KEY
Idempotency-Key: invoice-2026-001
Content-Type: application/json
{"operation":"pdfhq.ai.extract","upload_id":"UPLOAD_UUID","quote_id":"QUOTE_ID","question":"Extract the invoice fields.","allow_external_ai":true,"allow_ocr":false}Invoice extraction is model-assisted and not guaranteed to match accounting systems. Validate sums, currency and due dates before posting to ledgers. Scanned images need OCR enabled on the worker.
