image-similarity-api

Image Similarity API for n8n: compare a source image against up to 500 targets with CLIP vision-model scores plus perceptual-hash duplicate detection, one clean item per pair. Apify-backed community node, pay per comparison, usable as an AI agent tool.

Package Information

Released: 2 mo ago
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.1
Author: John Cole

Documentation

Image Similarity API for n8n

An n8n community node for the Image Similarity API on Apify. Compare a source image against up to 500 targets with CLIP vision-model similarity scores plus perceptual-hash duplicate detection, and get one clean item per source and target pair. Images can be public URLs, data URIs, or raw base64.

This is the Apify-backed node: no model hosting, GPUs or maintenance on your side, billed per comparison result on your Apify account, and it works as an AI Agent tool.

Install

  1. In n8n, open Settings then Community Nodes.
  2. Choose Install a community node and enter n8n-nodes-image-similarity-api.
  3. Confirm and restart when prompted. The Image Similarity node then appears in the node picker.

Self-hosted n8n only; n8n Cloud does not load community nodes.

Credentials

The node needs an Apify API token.

  1. Create a free account at apify.com.
  2. In the Apify Console, open Settings then API & Integrations and copy your token.
  3. In n8n, create an Apify API key connection credential and paste the token.

Operations

  • Compare Images: score visual similarity and detect duplicates, one item per source and target pair.

Comparison modes

  • Semantic and Duplicate Detection (default): runs the vision model and perceptual hashes, right for most runs.
  • Semantic Only: conceptual similarity scores without duplicate checks.
  • Duplicate Detection Only: perceptual hashes only, the fastest and cheapest way to find exact or near-exact copies.

Output modes

  • Simplified (default): a compact, LLM-friendly subset of fields. Forced automatically when the node runs as an AI Agent tool, to save context.
  • Raw: every field the API produces.
  • Selected Fields: pick exactly the fields you want.

Output fields

Field Meaning
resultType comparison for scored rows, error for targets that could not be processed
targetIndex Zero-based position of the target in the input list
sourceImage Echo of the source image URL or descriptor
sourceImageId Your identifier for the source image, echoed back
targetImage Echo of the target image URL or descriptor
customId Your identifier for the run or target, echoed back
similarityScore Cosine similarity of vision-model embeddings, 0 to 1
isSimilar True when the score meets the similarity threshold
phashDistance Perceptual hash Hamming distance, 0 to 64; 0 means structurally identical
dhashDistance Difference hash Hamming distance, a second duplicate signal
isNearDuplicate True when the pair is the same picture up to resizing or light edits
verdict duplicate, very-similar, related, or different
comparisonMode The mode the run used
embeddingModel The vision model that produced the score
errorMessage For error rows, why the target produced no comparison
processedAt UTC timestamp for the row

Full field semantics are documented on the Actor page.

Example workflows

  1. Catalog deduplication: a Schedule node feeds new product photos as targets against each master image and flags isNearDuplicate rows before they enter the catalog.
  2. Stolen-image watch: compare your originals against image URLs scraped from the web and alert on duplicate or very-similar verdicts.
  3. AI agent tool: let an agent answer "which of these screenshots show the same page?" by calling the node as a tool; the Simplified output keeps its context small.

Pricing

Runs bill to your Apify account per comparison result, with free credit to start. Error rows are never charged. Current rates are on the Actor page.

Links

License

MIT

Discussion