AI privacy & billing
External provider consent, local OCR, job idempotency, shared HQ-credit wallet reservations and crash reconciliation.
Data boundaries#
Only verified, account-scoped PDFs can be used. External model credentials remain on the server. Users must explicitly consent to transferring selected document snippets to the configured AI provider. No cross-tenant vector index is created. OCR uses a local Tesseract binary when enabled, and runs within bounded page, pixel and time limits.
Prompt injection inside PDFs is treated as untrusted text, not as a system instruction. Model output must cite valid source IDs. The original PDF text is not placed in the billing database; encrypted/private S3 lifecycle and deletion controls must be configured and tested before production.
Predictable metering and reconciliation#
HQTools owns pricing and atomic single-wallet HQ-credit reservations. A job must have a matching active quote for one operation. When a provider times out after admission, the job is marked needs_reconciliation: there is no automatic repeat that could double-spend. The support team must compare provider and wallet receipts before resolving those reservations.
Live AI traffic is off by default; only enable it after end-to-end wallet, provider, retention and privacy checks. See AI job lifecycle for exact endpoints.
