AI API · Image Similarity

Image Similarity

POST /image_similarity

https://ai.sneakypeekai.com

Check whether the first image appears inside the second. Both images must be public PNG or JPEG files up to 5 MB each. You get a yes or no match plus a similarity score and related details. Pass image1_url and image2_url as query parameters with an empty JSON body {}.

Uses 2 credits plus 1 request from your per-minute and daily caps.

Authentication

Authenticate requests by sending your API key in the X-API-Key HTTP request header.

Mint and manage API keys in your Sneaky Peek AI Account → API Keys.

X-API-Key: $API_KEY

Parameters

Name In Type Required Notes
X-API-Key header string yes Your API key. Missing or wrong key returns 401.
image1_url query string yes Public address of the smaller image to look for (PNG or JPEG, max 5 MB).
image2_url query string yes Public address of the larger image to search in (PNG or JPEG, max 5 MB).

Request Example (curl)

curl -X POST "https://ai.sneakypeekai.com/image_similarity?image1_url=https://example.com/logo.png&image2_url=https://example.com/shot.png" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Success Response Example (200 OK)

{
  "status": 200,
  "match": true,
  "image1_url": "https://example.com/logo.png",
  "image2_url": "https://example.com/shot.png",
  "details": {
    "similarity": 0.95,
    "threshold": 0.82,
    "faces_detected": false,
    "skipped": false,
    "skip_reason": "",
    "error": ""
  }
}

Common Error Status Codes

Status Code When / Description
400 Either image address is invalid, or the images cannot be compared.
401 The API key is missing or invalid.
402 Insufficient credits for this call.
413 An image is larger than 5 MB.
411 The HTTP Content-Length header is completely missing from the request.
429 You hit a rate or daily limit. Wait for the retry time in the response headers.