Segment Anything 2

Image editing

SAM 2 is a model for segmenting images and videos in real-time.

Input

Fields marked * are required. Review the price before generating.

URL of the image to be segmented

Uploading a file needs an account. Create accountJPEG, PNG, WebP · up to 25 MB

Additional settings

List of prompts to segment the image

Coordinates for boxes

Apply the mask on the image.

The format of the generated image.

Price$0.53 / run

You sign up first. Your settings are kept.

API code for this input

Complete the required fields and fix input errors to see API code.

How to use Segment Anything 2

Getting started

Select regions in a still image with Segment Anything 2’s image mode. Use spatial selection rather than a scene-generation prompt.

Review your result

Check selected boundaries and excluded regions; inspect the output format before relying on transparency.

Inputs and settings

Send image_url and supply point prompts or box_prompts using the schema’s coordinate structure.

apply_mask controls applying the selection to the image. For video, choose the separate video operation and its schema.