通过 PDFAPIHub 云 API 对两张图片或 PDF 进行视觉相似度比较,文档上传至 pdfapihub.com,采用特征匹配实现,...
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.
MethodDescriptionautoAutomatically selects best method (default)feature_matchOpenCV feature matchingssimStructural Similarity IndexphashPerceptual 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.
bash
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"
}'