PDFHQ logo

Documents

DocumentationDocuments & intelligence

Compare contracts API

Submit two account-isolated PDF revisions, retrieve source-tagged before/after citations and review proposed contractual changes.

Server-side API keys Signed storage uploads

Two documents, one quote-bound operation#

Use pdfhq.ai.compare for BEFORE and AFTER contract PDFs. Upload each source via the existing signed upload and verification endpoints. Both documents must belong to the same HQTools account and API project, and their combined size cannot exceed 12 MiB. Request an active single-unit pdfhq.ai.compare quote from the central HQTools catalogue.

cURL
POST https://api.pdfhq.io/v1/ai/jobs
x-api-key: PROJECT_API_KEY
Idempotency-Key: contract-revision-042
Content-Type: application/json

{"operation":"pdfhq.ai.compare","upload_id":"BEFORE_UPLOAD_UUID","comparison_upload_id":"AFTER_UPLOAD_UUID","quote_id":"MATCHING_QUOTE_ID","question":"Focus on payment and termination changes","allow_external_ai":true,"allow_ocr":false}

Result and review requirements#

The result contains data.changes with kind (added, removed or modified), summary, before_citations and after_citations. Returned citation IDs are revision-bound and tagged BEFORE/AFTER. The service checks citation structure and role, not the legal accuracy of AI interpretations. Comparison selects bounded changed excerpts, not a page-complete legal redline.

As with all AI jobs, accepted single-unit HQTools quotes reserve HQ credits. Failed known attempts release them; uncertain provider outcomes require reconciliation. Treat these outputs as a review aid, not legal advice or a complete contract comparison.

PDFHQ logo

PDF tools and document intelligence. Prepare, understand and work with your documents.

© 2026 PDFHQ. All rights reserved.