API reference
Blur faces
Anonymise faces in an image, optionally keeping people you have enrolled sharp.
POST /v1/face-blur/process1 operation per image
The programmatic form of Blur faces in the dashboard — same models, same allowance.
Request
multipart/form-data, with your key as a bearer token.
| Field | Type | Default | Description |
|---|---|---|---|
| imagerequired | file | — | JPEG, PNG or WebP. |
| blur_strength | integer | 12 | 4–24. Twelve matches the dashboard; lower is softer, higher is heavier. |
| mode | string | all | `all` blurs everyone. `except_enrolled` keeps recognised faces sharp. `only_enrolled` blurs just the recognised ones. |
| collection | string | — | Limit recognition to one enrolled collection. Omit to use every collection. |
| threshold | number | 0.9 | Recognition match score 0–1. Higher is stricter. |
Example
curl -X POST https://api.quantilence.com/v1/face-blur/process \
-H "Authorization: Bearer $QUANTILENCE_API_KEY" \
-F "image=@photo.jpg" \
-F "blur_strength=12" \
-F "mode=all" \
-F "collection=staff" \
-F "threshold=0.9"Response
200 OK with this shape. Values below are illustrative; the keys and types are not.
{
"success": true,
"faces_detected": 3,
"faces_blurred": 2,
"blur_strength": 12,
"mode": "except_enrolled",
"image_data": "/9j/4AAQSkZJRgABAQAAAQ…",
"faces": [
{
"face_index": 0,
"bbox": [
0.412,
0.188,
0.523,
0.361
],
"det_score": 0.891,
"blurred": false,
"matched": {
"ml_face_id": 4127,
"collection": "staff",
"sim_score": 94.2
}
}
],
"processing_time_ms": 268.4,
"degraded": null
}| Field | Type | Description |
|---|---|---|
| success | boolean | Always true on a 200. |
| faces_detected | integer | Faces found. |
| faces_blurred | integer | Of those, how many were blurred. |
| blur_strength | integer | The strength actually applied. |
| mode | string | The mode actually applied. |
| image_data | string | The result image, base64-encoded JPEG. Not a URL — decode and save it. |
| faces | Face[] | Every detected face, blurred or not. |
| faces[].face_index | integer | Position within this response. |
| faces[].bbox | float[4] | [x1, y1, x2, y2], normalised 0–1. |
| faces[].det_score | float | Detector confidence, 0–1. |
| faces[].blurred | boolean | Whether this face was blurred. |
| faces[].matched | Match | null | The enrolled face it was recognised as, when it was. |
| processing_time_ms | float | Model time. |
| degraded | string | null | Set when a selective mode could not read your enrolled faces and blurred everyone instead. The image is safe to publish; it is not the one you asked for. |
Worth knowing
- `image_data` is base64, not a URL. Nothing is stored on our side — decode it and keep it yourself.
- Always check `degraded`. A non-null value means a selective mode fell back to blurring everyone.
- `except_enrolled` and `only_enrolled` need faces enrolled first — see Enrol a face.