---
title: Prompted Image Segmentation API
slug: prompted-segmentation
url: https://apyhub.com/dosvak/service/prompted-segmentation
provider: Dosvak LLC
categories: [Artificial Intelligence]
tags: [image-segmentation, mask-extraction, object-detection, computer-vision, rle-mask]
auth: api_key
---

# Prompted Image Segmentation API

Segment objects from an image using a point prompt or bounding box. Returns RLE masks, scores, and prompt details for vision workflows.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/point` | What it does Segments an object in an uploaded image using a specified pixel coordinate as the prom… | 100 |
| POST | `/box` | What it does Segments the object in the uploaded image that falls inside the provided bounding box… | 100 |

## About

## What it does
Prompted Segmentation lets you isolate objects in an image using either a point prompt or a bounding box. Send a binary file plus coordinates, and get back segmentation masks encoded as RLE, along with the prompt you used and a mask score.

Use `POST /point` when you know a pixel on the object you want to include or exclude. Provide `x`, `y`, `file`, and optionally `label` to mark the point as foreground (`1`) or background (`0`). The response includes `masks`, the selected `point`, and `best_mask_index` so you can choose the most likely result.

Use `POST /box` when you already have a region of interest. Provide `x1`, `y1`, `x2`, `y2`, and `file`, and the service returns the normalized `box`, a `score`, and `mask_rle` for the segmented object. The RLE mask format is compact for storage and easy to pass into downstream image workflows.

Prompted Segmentation fits annotation pipelines, background removal tools, and object-focused image editing where you need a fast mask from minimal user input.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/dosvak/service/prompted-segmentation
