---
title: "Match Image"
method: POST
path: "/match"
---

# Match Image

`POST /match`

## Request

- Base URL: `https://api.colourmemory.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.colourmemory.com/match`
- Auth: none declared

PRIMARY ENDPOINT for Pixel phone workflow.

Accepts a photo. Extracts dominant colour in memory using:
  - Five-point sampling (centre + four corners)
  - sRGB pixels read as D65 CIELAB (no chromatic adaptation; no white-balance correction)
  - CIEDE2000 nearest-neighbour against the full archive

The image is NEVER stored. It exists in memory only for the duration of this call.
Privacy guarantee: we never see your photos.

Returns top-n archive matches with dE2000, confidence, nearest RAL.

Usage from curl:
    curl -X POST https://api.colourmemory.com/match           -F "file=@photo.jpg" -F "n=5"

Usage from fetch (browser / PWA):
    const fd = new FormData();
    fd.append('file', blob, 'photo.jpg');
    fd.append('n', '5');
    fetch('/match', { method: 'POST', body: fd })

## Headers

- `x-api-key` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/colourmemory/apis/colour-memory-api.md) · [All operations](https://skmtc.dev/colourmemory/apis/colour-memory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/colourmemory/apis/colour-memory-api/revisions/4ba028f64042?raw)
