---
title: "Store one photo's face scan"
method: POST
path: "/api/faces/scan-result"
tags: ["Faces"]
---

# Store one photo's face scan

`POST /api/faces/scan-result`

## Request

- Base URL: `https://trvlrr.app`
- URL: `https://trvlrr.app/api/faces/scan-result`
- Auth: HTTP bearer

Replaces any earlier scan of the photo. New faces are matched against confirmed faces and suggested a person where the embedding is close enough.

## Request body

- ScanResult
  - `photo_id` string, required
  - `faces` object[]
    - `x` number, required
    - `y` number, required
    - `w` number, required
    - `h` number, required
    - `embedding` string: Base64 of the float32 feature vector.
    - `dim` integer

## Response `200`

How many were stored and suggested.

- ScanStored
  - `stored` integer, required
  - `suggested` integer, required

## Other responses

- `400`: The request is malformed or fails validation.
- `401`: No usable credential: a Clerk session token, a device token or an OAuth access token is required.
- `402`: Trvlrr Plus is required, or this month's AI allowance is used up.
- `403`: The caller may not do this to this account or trip.
- `404`: No such thing, or not one the caller can see.

---

[API](https://skmtc.dev/trvlrr/apis/trvlrr-api.md) · [All operations](https://skmtc.dev/trvlrr/apis/trvlrr-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trvlrr/apis/trvlrr-api/revisions/ea024946b293?raw)
