imagepeek: perceptual hashes of an image (compare two images)
image_hashCompute perceptual hashes (aHash, dHash, pHash, wHash) of an image. Optionally compare two images using Hamming distance to detect near-duplicates.
Instructions
imagepeek: Compute perceptual hashes of an image, optionally compared. To group duplicates among up to 100 images use image_dedupe. Returns perceptual hashes of an image (aHash, dHash, pHash, wHash; 64 or 256 bits, imagehash-compatible) and, with a second image (compare_url or compare_base64), the Hamming distance and similarity per algorithm and likely_same (pHash distance at most bits / 6). A near-duplicate check, not proof that two images are or are not the same. With a second image the request body may be up to twice the single-image cap. Reads PNG, JPEG, WebP, GIF, TIFF, BMP, ICO and AVIF; other formats and images over 40 megapixels are refused (not charged). Images are never logged or stored. Typically 0.5-2 s. Price: USD 0.002. Free: 3 imagepeek calls per IP per UTC day. Docs: https://tanod.dev/learn/image-perceptual-hash-api.html
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64. | |
| hash_size | No | Hash grid: 8 (64-bit hashes, default) or 16 (256-bit). | |
| algorithms | No | Default: all four. | |
| auto_orient | No | Apply the EXIF orientation first (default true). | |
| compare_url | No | A second image to compare (or compare_base64). | |
| image_base64 | No | The image as standard or url-safe base64 (at most 10 MB decoded; a data:image/...;base64, prefix is fine); or use url. | |
| compare_base64 | No | A second image as base64 (at most 10 MB decoded; or compare_url). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bits | No | ||
| error | No | Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object. | |
| input | No | ||
| notes | No | ||
| hashes | No | ||
| source | No | ||
| compare | No | ||
| final_url | No | ||
| operation | No | ||
| source_url | No |