Free plan

Find Duplicates

Find pictures that are the same, even at different sizes
POST
/v1/images/find-duplicates

About this tool

Looks through a set of pictures and groups the ones that are the same picture: exact copies, and the same picture saved at another size, file type or quality. For each group it names the file that is best to keep. You need at least two pictures. A setting lets you decide how alike they must be.
For example, you check a folder of holiday photos to find the repeated ones before cleaning up.

How to use it

  1. Choose this tool.
  2. Add two or more pictures with Upload or drag and drop.
  3. If you like, change how alike pictures must be to count as the same.
  4. Press Generate.
  5. Read the groups and the file suggested to keep.

What you get back

You get a list of groups of matching pictures, each with the one worth keeping.
GOOD TO KNOW
Several pictures in, one answer out: the pictures are compared with each other. A mirrored or turned copy is not found on purpose. Every picture counts as one image.
TEST IT LIVE

Try Find Duplicates in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Images
Plan
Free
Method
POST
Endpoint
/v1/images/find-duplicates
Tool ID
images.find-duplicates
Authentication
API key
Accepts
JPEG, PNG, WEBP, GIF, AVIF, TIFF +15 more
Background jobs
Yes
Usage group
Image
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/images/find-duplicates" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'images=@photo.jpg' \
  -F 'threshold=10' \
  -F 'validate_only=false' \
  -F 'presetId=00000000-0000-4000-8000-000000000000'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.images.findDuplicates({
    "images": 'photo.jpg',
    "threshold": 10,
    "validate_only": false,
    "presetId": "00000000-0000-4000-8000-000000000000"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->images()->findDuplicates([
    'images' => 'photo.jpg',
    'threshold' => 10,
    'validate_only' => false,
    'presetId' => '00000000-0000-4000-8000-000000000000',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Find which pictures are the same picture: exact copies, and the same picture saved again at another size, format or quality. Each group names the file worth keeping.

Find Duplicates accepts JPEG, PNG, WEBP, GIF, AVIF, TIFF, SVG, SVGZ, BMP, ICO, APNG, PNM and 9 more. You can send several files in one request.

Find Duplicates is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/images/find-duplicates with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.