---
title: "Segment Anything 2"
method: POST
path: "/segment-anything-2"
---

# Segment Anything 2

`POST /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

## Changes

- **2024-09-04** `dbbbd2944bf2` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/livepeer/apis/livepeer-ai-runner/changes/segment-anything-2/post.md)

---

[API](https://skmtc.dev/livepeer/apis/livepeer-ai-runner.md) · [All operations](https://skmtc.dev/livepeer/apis/livepeer-ai-runner/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/livepeer/livepeer-ai-runner/revisions/dbbbd2944bf2/schema)
