Vai al contenuto
GET /v1/compare

Compare two images

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/imghash-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

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_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo 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
}