Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xcoder-es/media-cleaner-pro/llms.txt

Use this file to discover all available pages before exploring further.

The /api/start endpoint launches a new image processing pipeline in the background. The pipeline runs asynchronously and its progress can be monitored via GET /api/status, the real-time SSE stream at GET /api/progress, or GET /api/logs. The endpoint returns immediately with the initial job state once the pipeline task has been spawned.
POST /api/start
Content-Type: application/json
MediaCleaner Pro runs one job at a time. Starting a new job while one is already running will reset the state machine and spawn a fresh pipeline task, overwriting all progress from the previous run. Check is_running in GET /api/status before calling this endpoint if you want to avoid interrupting an active job.

Request body

source_dir
string
required
Absolute path to the directory containing the images you want to process. If an empty string is provided, the previously configured source_dir value is retained unchanged.
dest_dir
string
required
Absolute path to the output directory where organised results will be written. If an empty string is provided, the previously configured dest_dir is retained unchanged.
hamming_threshold
integer
Perceptual similarity threshold used during dHash comparison. Two images are considered duplicates when their Hamming distance is less than or equal to this value. Accepts integers in the range 064. Defaults to 4 (the compiled-in default) if omitted.
  • 0 — only exact pixel-level duplicates match.
  • 4 — slight compression artefacts and minor resizes match (recommended default).
  • 10+ — broader similarity; may produce false positives on visually distinct images.

Response fields

job_id
string
required
UUID v4 string uniquely identifying this job, e.g. "550e8400-e29b-41d4-a716-446655440000". Stable for the lifetime of the running process.
status
string
required
Always "started" on a successful response.
is_running
boolean
required
Always true immediately after a successful start.
is_paused
boolean
required
Always false immediately after a successful start.
stages
array of StageInfo
required
Initial stage list with every stage in "pending" status. See GET /api/status for the full StageInfo field reference.
stats
ProcessingStats
required
Initial statistics object with all counters at zero. See GET /api/status for the full ProcessingStats field reference.

Example

curl -X POST http://127.0.0.1:8080/api/start \
  -H 'Content-Type: application/json' \
  -d '{"source_dir": "/home/user/photos", "dest_dir": "/home/user/cleaned", "hamming_threshold": 4}'
{
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "started",
  "is_running": true,
  "is_paused": false,
  "stages": [],
  "stats": {
    "unique_count": 0,
    "duplicate_count": 0,
    "error_count": 0,
    "speed": 0.0,
    "eta_seconds": 0,
    "memory_mb": 0,
    "cpu_percent": 0.0,
    "current_file": null,
    "current_dhash": null
  }
}

Build docs developers (and LLMs) love