---
title: "Crop a photo by hand out of one original screenshot of this person"
method: POST
path: "/api/v1/contacts/{id}/dating-photos/crop"
---

# Crop a photo by hand out of one original screenshot of this person

`POST /api/v1/contacts/{id}/dating-photos/crop`

## Request

- Base URL: `https://memchats.com`
- URL: `https://memchats.com/api/v1/contacts/{id}/dating-photos/crop`
- Auth: HTTP bearer

For when the automatic crop failed. `rect` is in fractions 0-1 of the screenshot as shown (EXIF orientation applied), at least 0.05 on each side and inside the image. The stored original is cropped (no model call, no quota), encoded like every other gallery photo, and appended at the end with `source: manual` and its `screenshotId`. The same rules as the automatic crop apply: a photo already in the gallery is not added twice and a contact keeps at most 12. Errors carry a stable `code`. Rejected for demo sessions.

## Path parameters

- `id` integer, required

## Request body

- object
  - `screenshotId` integer, required: A screenshot of this contact (the `screenshots` block of GET /contacts/{id}/dating).
  - `rect` object, required
    - `x` number, required
    - `y` number, required
    - `w` number, required
    - `h` number, required

## Response `201`

The photo added

- object
  - `photo` DatingPhoto
    - `id` integer
    - `position` integer, nullable
    - `hasFace` boolean, nullable
    - `caption` string, nullable
    - `width` integer, nullable
    - `height` integer, nullable
    - `source` 'auto' | 'manual': `manual` when the user cropped it by hand from a screenshot.
    - `screenshotId` integer, nullable: The original screenshot it came from (GET /contact-screenshots/{screenshotId}/image); null for photos saved before 2026-10-05.
    - `isCover` boolean: The cover the user chose: after a reorder, the first photo.

## Other responses

- `400`: `invalid_rect`: missing screenshot id, or a rectangle outside the image or too small
- `401`: No session
- `403`: Demo session (read only)
- `404`: Contact not found, `screenshot_not_found` (not of this contact or user) or `screenshot_unreadable`
- `409`: `gallery_full` (12 photos) or `duplicate_photo` (already in the gallery)
- `422`: `crop_too_small`: under 48 px on a side of the original
- `429`: Too many uploads or crops in a short time
- `503`: `storage_unavailable`: image storage not configured

---

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