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

# Image Segmentation API

Detect and segment objects in JPEG, PNG, or WebP images. Returns mask data, bounding boxes, image size, and quality scores for each segment.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `` | What it does Uploads an image and automatically segments the objects it contains. The response retu… | 100 |

## About

## What it does
Image Segmentation detects and separates objects in an image, then returns a mask for each detected region. Send a JPEG, PNG, or WebP file and you get object masks back in a structured response you can use for editing, analysis, or downstream computer vision workflows.

The request body accepts a binary `file` and an optional `max_masks` limit from 1 to 200, with a default of 50. That makes it easy to control how many segments you want from a single image without changing the source image itself.

The response includes `mask_count`, the original `image_size` (`h` and `w`), and a `masks` array. Each mask can include `area`, `bbox` as `[x, y, w, h]`, `mask_rle` with run-length encoded data, plus `predicted_iou` and `stability_score` for quality assessment.

Use Image Segmentation when you need to isolate foreground objects, prepare regions for annotation, measure object coverage, or feed segmented regions into an image pipeline. It’s a practical fit for product photography, scene understanding, and automated image analysis.

## Usage

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