ForHosting KIT · Images

Compare two images

Point our image similarity API at two images and get back a numeric score for how visually alike they are, from pixel-level duplicates to loosely related compositions. It exists for the moment you need a machine to answer 'is this the same picture, a crop of it, or something else entirely' without a human squinting at two tabs.

Temporarily withdrawnPer request + per image$0.002

This task is not available right now, so it cannot be purchased. Nothing is charged for it.

How it works & API
Use it from WebAPIEmailApp soonTelegram soon

The problem: two files, one question

Anyone running a catalog, a moderation queue, or a user-generated content pipeline eventually hits the same wall: two images arrive and someone has to decide whether they are duplicates, re-uploads, watermarked copies, or just coincidentally similar. Doing that by eye does not scale past a few dozen pairs a day. POST /image/compare turns that judgment call into a repeatable, queryable number.

What you send, what comes back

You submit two image references in a single request; the task runs asynchronously and returns a task_id immediately so your caller is never blocked waiting on image processing. When the comparison finishes, you get a similarity score plus enough structure to set your own threshold — a marketplace flagging duplicate listings might treat 0.9 as a match, while a mood-board tool comparing loose visual style might accept anything above 0.5.

Why perceptual comparison, not byte comparison

Two JPEGs of the same photo saved at different quality levels are not byte-identical, and a resized or slightly cropped copy is not pixel-identical either — yet a person looking at both instantly knows they are the same picture. Image similarity techniques grew out of that exact gap between how computers store images and how people perceive them, evolving from simple hashing to comparisons that tolerate resizing, compression artifacts, and minor edits while still catching real duplicates.

Where it fits in a pipeline

Because the endpoint is async and result-driven, it slots cleanly into batch jobs: a nightly worker can walk a media library, compare new uploads against a reference set, and act only on the pairs that cross a similarity threshold, all without holding a connection open. Pair it with a webhook and you get a fully event-driven dedication pipeline instead of a script that polls and waits.

What it will not do

This is a similarity score, not a facial recognition or plagiarism verdict, and it makes no claim about copyright, identity, or intent — it tells you how alike two images are, and you decide what that means for your product. That honesty keeps the output predictable: no invented confidence percentages, just a consistent metric you can tune against your own data.

Marketplace duplicate detection

Compare a newly listed product photo against existing listings to flag likely duplicate or stolen listings before they go live.

User-generated content moderation

Check incoming uploads against a set of previously banned images to catch re-uploads of removed content.

Asset library deduplication

Sweep a design or media library for near-identical files saved under different names before a migration.

Watermark and reuse checks

Compare a published image against a reference to see how closely a suspected reuse or crop matches the original.

How does the image similarity API return results?

Every call to POST /image/compare returns a task_id right away; the actual score arrives later via a signed webhook or a signed link valid for 24 hours, since comparison runs asynchronously.

Is there a free tier?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

What does a comparison cost?

Each request is $0.002 plus $0.002 per image compared, billed only on successful completion.

What image formats are accepted?

Common raster formats are accepted for comparison; if a submitted file cannot be decoded, the task fails cleanly and is not charged.

What does the similarity score mean?

It is a numeric measure of visual likeness between the two images you submit — you set the threshold that counts as a match for your use case, since 'duplicate' means different things in different products.

Am I charged if the comparison fails?

No. Failed tasks are retried automatically up to three times and are never billed; you only pay for a completed comparison.

Can I compare images in bulk?

Yes, submit multiple pairs as separate asynchronous requests; each returns its own task_id so you can track and reconcile results independently.

How is this different from a hash-based duplicate checker?

A simple hash comparison breaks the moment an image is resized, recompressed, or lightly edited; this endpoint is built to tolerate exactly those variations while still detecting genuine similarity.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/image/compare

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/image/compare \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image":"https://ejemplo.com/imagen.jpg"}'
{
  "image": "https://ejemplo.com/imagen.jpg"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "image.compare",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002
Per image$0.0015

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb15
max_megapixels12
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →