---
title: "Snap a hand-drawn mask to the selected object"
method: POST
path: "/v1/snap-mask"
tags: ["generate"]
---

# Snap a hand-drawn mask to the selected object

`POST /v1/snap-mask`

Refine a hand-drawn binary mask to the object it marks. Supply the source image and a mask with the same dimensions; white (>= 128) marks the object. The response is a binary PNG mask with white pixels marking the snapped object.

## Response `200`

The snapped binary object mask as a PNG image.

## Other responses

- `400` — Invalid input provided.
- `401` — Not authorized to snap a mask.
- `429` — Too many requests.

---

[API](https://skmtc.net/ideogram/apis/ideogram-openapi-3-0.md) · [All operations](https://skmtc.net/ideogram/apis/ideogram-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ideogram/ideogram-openapi-3-0/revisions/bd40f367a834/schema)
