Automatic segmentation
Auto mode finds every object in the image (or a cropped region) with no prompt needed. Returns up to 100 segments sorted by area.
Send an image URL and choose a mode. In auto mode, the service detects every object in
Learn more about Image SegmentationAuto mode finds every object; hover and click the result to explore masks.
Masks show up here
Every detected object gets its own colored, clickable mask.
Send an image URL and choose a mode. In auto mode, the service detects every object in the image (or in a rectangular region you specify) and returns up to 100 segments sorted by area. In prompt mode, you point at a specific object with coordinates or a bounding box and get up to 3 mask candidates ranked by confidence. Each segment comes with a mask in COCO RLE format — compact and easy to decode on any platform — plus its bounding box, area, confidence scores, and centroid. Images larger than 4096 px on a side are resized automatically. Responses are synchronous: the result comes back in the same call.
Auto mode finds every object in the image (or a cropped region) with no prompt needed. Returns up to 100 segments sorted by area.
Prompt mode targets one object using point coordinates (foreground/background labels) or a bounding box. Returns up to 3 mask candidates ranked by confidence.
Masks come back as compact COCO Run-Length Encoding, and can be passed straight to the Inpainting service for object removal.
In auto mode, optionally restrict analysis to a rectangular region {x, y, width, height} of the image.
Object removal prep
Detect objects, let users pick which to remove, then feed selected mask_rle values to the Inpainting service.
Image annotation
Auto-generate segmentation masks for labeling workflows.
Content analysis
Count objects, measure areas, and classify regions in an image.
input
Image URL, mode (auto or prompt), optional region/points/box
output
Array of segments with mask_rle, bbox, area, predicted_iou, stability_score, centroid
imageUrlrequiredstringPublic URL of the image to analyze
modestring · default: autoSegmentation mode: 'auto' (find all objects, default) or 'prompt' (target specific object)
enum: auto, prompt
regionobjectAuto mode only. Restrict analysis to a rectangular region: {x, y, width, height}
pointsarrayPrompt mode. Point prompts: [{x, y, label}]. label 1 = foreground, 0 = background.
boxarrayPrompt mode. Bounding box prompt: [x1, y1, x2, y2].
data.image_sizeobjectwidth and height of the (possibly resized) image
data.segmentsarrayArray of segment objects
data.segments[].mask_rleobjectCOCO Run-Length Encoding of the segment mask
data.segments[].bboxarray[x, y, width, height] bounding box
data.segments[].areaintegerMask area in pixels
data.segments[].predicted_iounumberPredicted intersection-over-union (confidence)
data.segments[].stability_scorenumberMask stability score
data.segments[].centroidarray[x, y] centroid of the mask
data.segment_countintegerTotal number of segments returned
Billed per image analyzed, regardless of segment count.
| Service | Unit | Price |
|---|---|---|
| Image Segmentation | item | 2 credits/image |
Pricing is the same for auto and prompt modes.