---
title: "Segment Anything 2"
method: POST
path: "/api/generate/segment-anything-2"
tags: ["generate"]
---

# Segment Anything 2

`POST /api/generate/segment-anything-2`

Segment objects in an image.

## Response `200`

Successful Response

- MasksResponse — Response model for object segmentation.
  - `masks` string, required — The generated masks.
  - `scores` string, required — The model's confidence scores for each generated mask.
  - `logits` string, required — The raw, unnormalized predictions (logits) for the masks.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `422` — Validation Error
- `500` — Internal Server Error
- `default` — Error

---

[API](https://skmtc.net/livepeer/apis/untitled-api.md) · [All operations](https://skmtc.net/livepeer/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/livepeer/untitled-api/versions/dfc937fc0d2c/schema)
