{"openapi":"3.1.0","info":{"title":"DiffPaca — Verified Drawing Diff","description":"DiffPaca compares two revisions of a PDF (construction drawings, blueprints, design plans; also spreadsheets, patents, question banks) and returns a verified change report: every changed region with visual evidence crops, OCR citations, a self-verification status (verified / needs_human), and descriptions in Japanese, English, and Chinese. A deterministic diff engine guarantees recall — no changed pixel escapes detection; the LLM layer only explains detected changes and never invents new ones. The LLM never sees full pages, only cropped regions, so confidential documents stay compartmentalized. pdf diff, drawing comparison, document change detection, blueprint compare, design change confirmation, 図面差分, 図面比較, 設計変更確認, 图纸对比, 变更核查.","contact":{"name":"DiffPaca","url":"https://diff-api-586747566167.asia-northeast1.run.app/","email":"hello@alpaca-army.com"},"license":{"name":"Proprietary"},"version":"0.6.0","x-guidance":"Verified document diff for PDF pairs. POST /v1/compare with multipart files `before` and `after` (two PDF versions of the same document). Returns 202 {task_id}; poll GET /v1/tasks/{task_id} until status=succeeded (typical 2-4 min), then GET /v1/tasks/{task_id}/result for the full JSON report and /v1/tasks/{task_id}/files/{path} for artifacts (annotated pages, evidence crops). The report lists every changed region with page, bbox, evidence crop path, OCR citations, and a verification status: `verified` (safe to quote) or `needs_human` (inconclusive; show the crop to a human). Every finding includes description_ja, description_en, and description_zh. Use when no change may be missed: construction drawing revisions, contract redlines, spec updates. A deterministic diff engine guarantees recall; the LLM layer only explains detected changes and never invents new ones. The LLM never sees full document text, only cropped regions, so confidential drawings stay compartmentalized. Cheap probe first: POST /v1/compare/preview (0.005 USD, sync, ~10-30s) returns region count, bounding boxes, and annotated pages without semantic interpretation; use it to sanity-check a pair before the full report. Full report: 0.50 USD per comparison in USDC (max 50MB per file). Unpaid calls return 402 with x402 terms; pay on any accepted network and retry with the payment header.","x-logo":{"url":"https://diff-api-586747566167.asia-northeast1.run.app/logo.png","altText":"DiffPaca"}},"paths":{"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/v1/health":{"get":{"summary":"V1 Health","operationId":"v1_health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response V1 Health V1 Health Get"}}}}}}},"/v1/compare":{"post":{"summary":"Compare two PDF revisions (async, full verified report)","description":"Upload `before` and `after` PDF files (multipart). Returns 202 with a task_id; poll /v1/tasks/{task_id} and fetch the verified change report with evidence crops and trilingual descriptions.","operationId":"compare_v1_compare_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_compare_v1_compare_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-payment-info":{"price":{"amount":"0.50","currency":"USD"},"protocols":{"x402":{"scheme":"exact","asset":"USDC","networks":["eip155:8453","eip155:5042","eip155:137"],"payTo":"0x9099f2275875d2a56772f0158f36c9e42073e0e0","header":"Payment-Signature (x402 v2) or X-PAYMENT (v1)"}}}}},"/v1/compare/preview":{"post":{"summary":"Quick diff probe (sync, engine-only)","description":"Upload `before` and `after` PDF files. Returns changed-region count, bounding boxes, and annotated pages synchronously in seconds. No LLM interpretation; use to sanity-check a pair before the full report.","operationId":"compare_preview_v1_compare_preview_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_compare_preview_v1_compare_preview_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-payment-info":{"price":{"amount":"0.005","currency":"USD"},"protocols":{"x402":{"scheme":"exact","asset":"USDC","networks":["eip155:8453","eip155:5042","eip155:137"],"payTo":"0x9099f2275875d2a56772f0158f36c9e42073e0e0","header":"Payment-Signature (x402 v2) or X-PAYMENT (v1)"}}}}},"/v1/tasks/{task_id}":{"get":{"summary":"Task Status","operationId":"task_status_v1_tasks__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Task Status V1 Tasks  Task Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tasks/{task_id}/result":{"get":{"summary":"Task Result","operationId":"task_result_v1_tasks__task_id__result_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tasks/{task_id}/files/{relpath}":{"get":{"summary":"Task File","operationId":"task_file_v1_tasks__task_id__files__relpath__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"relpath","in":"path","required":true,"schema":{"type":"string","title":"Relpath"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_compare_preview_v1_compare_preview_post":{"properties":{"before":{"type":"string","contentMediaType":"application/octet-stream","title":"Before"},"after":{"type":"string","contentMediaType":"application/octet-stream","title":"After"}},"type":"object","required":["before","after"],"title":"Body_compare_preview_v1_compare_preview_post"},"Body_compare_v1_compare_post":{"properties":{"before":{"type":"string","contentMediaType":"application/octet-stream","title":"Before"},"after":{"type":"string","contentMediaType":"application/octet-stream","title":"After"}},"type":"object","required":["before","after"],"title":"Body_compare_v1_compare_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"externalDocs":{"url":"https://diff-api-586747566167.asia-northeast1.run.app/docs","description":"Interactive API docs (Swagger UI)"}}