Skip to content
GET /v1/compare

Compare two images

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/imghash-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/imghash-api/v1/compare" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/imghash-api/v1/compare", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/imghash-api/v1/compare");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/imghash-api/v1/compare",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "hashes": {
            "image1": {
                "ahash": "fcfffff310100000",
                "dhash": "313c156666e4e584",
                "phash": "4edbd88c49eaf808"
            },
            "image2": {
                "ahash": "fcfffff310100000",
                "dhash": "313c156666e4e584",
                "phash": "4edbd88c49eaf808"
            }
        },
        "comparison": {
            "ahash": {
                "distance": 0,
                "similarity": 100
            },
            "dhash": {
                "distance": 0,
                "similarity": 100
            },
            "phash": {
                "distance": 0,
                "similarity": 100
            }
        },
        "likely_same": true,
        "average_similarity": 100
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:01.433Z",
        "request_id": "63dd58de-3f23-4e04-83bd-8fc695338515"
    },
    "status": "ok",
    "message": "Compare two images",
    "success": true
}