Image Similarity API compares two images and returns a percentage value that tells you how visually similar they are. The higher the score, the more similar the two images are with a score of '100' being identical. The API accepts images as URLs with various extensions supported (jpg, jpeg, png, webp)
Example in Python: (URLs)
import requests
url = "https://api.promptapi.com/image_similarity?image1=https%3A%2F%2Fm.media-amazon.com%2Fimages%2FI%2F71NaMlQ3WpL._AC_UY218_.jpg&image2=https%3A%2F%2Fm.media-amazon.com%2Fimages%2FI%2F71uPr4KromL._AC_UY218_.jpg"
headers = {
'apikey': 'YOUR API KEY'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
Example Response:
{ "similarity_score": 82.7977 }