Segment Anything 2
SAM 2 is a model for segmenting images and videos in real-time.
Input
Fields marked * are required. Review the price before generating.
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.