← Duplicate Photo Finder
Your token

Duplicate Photo Finder API

Finding look-alikes, bursts, blurry photos and screenshots, picking the best shot and every download run free in the browser and need no API. The API is for the one metered step: send a goal and the page's measurements of the photos you keep (never the photos), and get back, as JSON, the ids of the photos for the album, each with one reason from a fixed list. The page builds this input from your photos and checks every pick before showing it.

Base URL: https://api.skillsafe.ai/v1/app-api. Every response is {"data": ...} or {"error": {"code", "message"}}; read error.code and error.message rather than the HTTP status alone.

The task field

This app has one task. Always send "task": "album".

taskWhat it doesReply
albumChooses exactly count photos for a goal from the photos listed, following the rules in limits (shape, screenshots, blurry shots, every day), each with a reason that holds by the numbers.One JSON object

Input fields

Every field is a string; facts and limits hold JSON text. task, facts and limits are required.

FieldMeaning
task"album"
goalWhat the album is for, up to 160 characters, for example The best photos, One per day or Landscape photos for a desktop slideshow.
factsJSON object: photos, up to 150, oldest first, each {id, name, day, time, part_of_day, shape, sharpness, exposure, moment_shots, screenshot, blurry}; kept_total; sent. sharpness is a rank among the photos listed (0 to 100); exposure is 100 when no pixel is pure black or white, down to 0 at 5% or more.
limits{count, shape, allow_screenshots, allow_blurry, cover_days, days, sharp_min, exposed_min, moment_min}. The page sets count to what fits the rules.

The reply

job.output.output is text holding one JSON object: picks, an array of {"id", "why"}, where why is one of fits_goal, big_moment, sharp, well_exposed, covers_day. Before using it, check it as the page does: every id is one of the photos, used once; there are exactly count; each obeys shape, allow_screenshots and allow_blurry; every day in days appears when cover_days is true; and each reason holds (big_moment: moment_shots ≥ moment_min; sharp: sharpness ≥ sharp_min; well_exposed: exposure ≥ exposed_min). If the balance ran low, truncated is true and the list may stop early; the page keeps the picks that arrived whole.

Worked example

Input (input.json), from the page's "A beach day" example with the goal "The best photos":

{
  "task": "album",
  "goal": "The best photos",
  "facts": "{\"photos\":[{\"id\":\"p13\",\"name\":\"IMG_4150.JPG\",\"day\":\"2025-07-12\",\"time\":\"10:01\",\"part_of_day\":\"morning\",\"shape\":\"landscape\",\"sharpness\":86,\"exposure\":86,\"moment_shots\":1,\"screenshot\":false,\"blurry\":false},{\"id\":\"p3\",\"name\":\"IMG_4103.JPG\",\"day\":\"2025-07-12\",\"time\":\"11:02\",\"part_of_day\":\"midday\",\"shape\":\"landscape\",\"sharpness\":43,\"exposure\":83,\"moment_shots\":5,\"screenshot\":false,\"blurry\":false},{\"id\":\"p14\",\"name\":\"IMG_4160.JPG\",\"day\":\"2025-07-12\",\"time\":\"12:11\",\"part_of_day\":\"midday\",\"shape\":\"landscape\",\"sharpness\":57,\"exposure\":72,\"moment_shots\":2,\"screenshot\":false,\"blurry\":false},{\"id\":\"p9\",\"name\":\"IMG_4120.JPG\",\"day\":\"2025-07-12\",\"time\":\"13:20\",\"part_of_day\":\"midday\",\"shape\":\"landscape\",\"sharpness\":0,\"exposure\":100,\"moment_shots\":1,\"screenshot\":false,\"blurry\":false},{\"id\":\"p11\",\"name\":\"IMG_4130.JPG\",\"day\":\"2025-07-12\",\"time\":\"16:05\",\"part_of_day\":\"afternoon\",\"shape\":\"landscape\",\"sharpness\":29,\"exposure\":100,\"moment_shots\":1,\"screenshot\":false,\"blurry\":false},{\"id\":\"p15\",\"name\":\"IMG_4170.JPG\",\"day\":\"2025-07-12\",\"time\":\"17:30\",\"part_of_day\":\"afternoon\",\"shape\":\"landscape\",\"sharpness\":71,\"exposure\":57,\"moment_shots\":1,\"screenshot\":false,\"blurry\":false},{\"id\":\"p7\",\"name\":\"IMG_4111.JPG\",\"day\":\"2025-07-12\",\"time\":\"19:48\",\"part_of_day\":\"evening\",\"shape\":\"landscape\",\"sharpness\":14,\"exposure\":100,\"moment_shots\":2,\"screenshot\":false,\"blurry\":false},{\"id\":\"p16\",\"name\":\"Screenshot_2025-07-12-09-12-40.png\",\"day\":\"unknown\",\"time\":\"\",\"part_of_day\":\"unknown\",\"shape\":\"portrait\",\"sharpness\":100,\"exposure\":0,\"moment_shots\":1,\"screenshot\":true,\"blurry\":false}],\"kept_total\":8,\"sent\":8}",
  "limits": "{\"count\":5,\"shape\":\"any\",\"allow_screenshots\":false,\"allow_blurry\":false,\"cover_days\":false,\"days\":[],\"sharp_min\":67,\"exposed_min\":90,\"moment_min\":3}"
}

Reply:

{"picks":[{"id":"p3","why":"big_moment"},{"id":"p13","why":"sharp"},{"id":"p15","why":"sharp"},{"id":"p14","why":"fits_goal"},{"id":"p7","why":"well_exposed"}]}

Errors

HTTPWhat to do
401The token is missing, expired or a guest token on a run. Get a personal token on the token page.
402The balance is below what the run reserves. Top up at skillsafe.ai/account/billing.
400The body is not a JSON object of the fields above, or a required field is missing or empty.
429Wait and retry with the same Idempotency-Key.

Step 1 — a tiny client helper

One function that sends JSON and unwraps the {data, error} envelope.

BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="paste-your-token-here"   # from https://duplicate-photo-finder.skillsafe.ai/tokens.html
api() { # api METHOD PATH [JSON-BODY]
  curl -s -X "$1" "$BASE$2" -H "Content-Type: application/json" \
    ${TOKEN:+-H "Authorization: Bearer $TOKEN"} ${3:+--data "$3"}
}

Step 2 — a token

A guest token is enough for /me and /estimate. A run is metered, so it needs your personal token: sign in on the token page and copy it.

# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN=$(curl -s -X POST "$BASE/guest" -H "Content-Type: application/json" -d '{"slug":"duplicate-photo-finder"}' | jq -r '.data.token')

Step 3 — who am I, and my balance

subject_type is guest or user; credits is the balance (1 credit = $0.0001).

api GET /me | jq '.data | {subject_type, credits}' 

Step 4 — price a run for free

/estimate charges nothing and starts no job. hold_credits is the amount reserved while a run is in flight, not the price; the run is charged what it uses.

# input.json: the run input object - {"task": "album", "goal": "The best photos", "facts": "{\"photos\":[{\"id\":\"p13\",\"name\":\"IMG_4150.JPG\",\"day\":\"2025-07-12\",\"time\":\"10:01\",\"part_of_day\":\"morning\",\"shape\":\"landscape\",\"sharpness\":86,\"exposure\":86,\"moment_shots\":1,\"screenshot\":false,\"blurry\":false},{\"id\":\"p3\",\"name\":\"IMG_4103.JPG\",\"day\":\"2025-07-12\",\"time\":\"11:02\",\"part_of_day\":\"midday\",\"shape\":\"landscape\",\"sharpness\":43,\"exposure\":83,\"moment_shots\":5,\"screenshot\":false,\"blurry\":false},{\"id\":\"p14\",\"name\":\"IMG_4160.JPG\",\"day\":\"2025-07-12\",\"time\":\"12:11\",\"part_of_day\":\"midday\",\"shape\":\"landscape\",\"sharpness\":57,\"exposure\":72,\"moment_shots\":2,\"screenshot\":false,\"blurry\":false},{\"id\":\"p9\",\"name\":\"IMG_4120.JPG\",\"day\":\"2025-07-12\",\"time\":\"13:20\",\"part_of_day\":\"midday\",\"shape\":\"landscape\",\"sharpness\":0,\"exposure\":100,\"moment_shots\":1,\"screenshot\":false,\"blurry\":false},{\"id\":\"p11\",\"name\":\"IMG_4130.JPG\",\"day\":\"2025-07-12\",\"time\":\"16:05\",\"part_of_day\":\"afternoon\",\"shape\":\"landscape\",\"sharpness\":29,\"exposure\":100,\"moment_shots\":1,\"screenshot\":false,\"blurry\":false},{\"id\":\"p15\",\"name\":\"IMG_4170.JPG\",\"day\":\"2025-07-12\",\"time\":\"17:30\",\"part_of_day\":\"afternoon\",\"shape\":\"landscape\",\"sharpness\":71,\"exposure\":57,\"moment_shots\":1,\"screenshot\":false,\"blurry\":false},{\"id\":\"p7\",\"name\":\"IMG_4111.JPG\",\"day\":\"2025-07-12\",\"time\":\"19:48\",\"part_of_day\":\"evening\",\"shape\":\"landscape\",\"sharpness\":14,\"exposure\":100,\"moment_shots\":2,\"screenshot\":false,\"blurry\":false},{\"id\":\"p16\",\"name\":\"Screenshot_2025-07-12-09-12-40.png\",\"day\":\"unknown\",\"time\":\"\",\"part_of_day\":\"unknown\",\"shape\":\"portrait\",\"sharpness\":100,\"exposure\":0,\"moment_shots\":1,\"screenshot\":true,\"blurry\":false}],\"kept_total\":8,\"sent\":8}", "limits": "{\"count\":5,\"shape\":\"any\",\"allow_screenshots\":false,\"allow_blurry\":false,\"cover_days\":false,\"days\":[],\"sharp_min\":67,\"exposed_min\":90,\"moment_min\":3}"}
api POST /estimate "$(cat input.json)" | jq '.data | {hold_credits, min_credits, model, model_alias, markup_bps, warnings}' 

Step 5 — run it and wait for the job

Send an Idempotency-Key derived from the input: a retry with the same key is never billed twice.

KEY="duplicate-photo-finder:album:$(shasum -a 256 input.json | cut -c1-16):a1"
JOB=$(curl -s -X POST "$BASE/run" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $KEY" --data @input.json | jq -r '.data.job_id')
while :; do
  J=$(api GET "/jobs/$JOB"); S=$(echo "$J" | jq -r '.data.status')
  case "$S" in succeeded|failed|cancelled) break;; esac; sleep 2
done
echo "$J" | jq -r '.data.output.output' > reply.json   # one JSON object: picks
echo "$J" | jq '.data | {charged_credits, truncated}' 

Step 6 — or stream it

/run-stream sends Server-Sent Events while the job runs and the finished job at the end.

# Server-Sent Events: tick/delta events while the job runs, then a final event with the job
curl -N -s -X POST "$BASE/run-stream" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: duplicate-photo-finder:album:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json