Compares two documents (images or PDFs) for visual similarity via the PDFAPIHub hosted API. Both documents are uploaded to PDFAPIHub servers where comparison is performed, and a similarity score (0–1) with confidence level is returned.
| Method | Description |
|---|---|
| -------- | ------------- |
auto | Automatically selects best method (default) |
feature_match | OpenCV feature matching |
ssim | Structural Similarity Index |
phash | Perceptual hashing |
Two files via one of:
url1 + url2 — public URLsimage1_base64 + image2_base64 — base64-encoded filesfile1 and file2This skill calls the PDFAPIHub hosted API at https://pdfapihub.com/api. Both documents are uploaded to PDFAPIHub servers for comparison.
Send your API key in the CLIENT-API-KEY header.
Get your free API key at https://pdfapihub.com. Full API documentation is available at https://pdfapihub.com/docs.
Privacy note: Both documents you compare are uploaded to PDFAPIHub's cloud service for processing. Do not send confidential documents unless you trust the service. Files are auto-deleted after 30 days.
curl -X POST https://pdfapihub.com/api/v1/document/similarity \
-H "CLIENT-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url1": "https://pdfapihub.com/sample-document-similarity-1.jpg",
"url2": "https://pdfapihub.com/sample-document-similarity-2.jpg",
"method": "auto"
}'
共 1 个版本