You're looking at a specific version of this model. Jump to the model overview.

meta /sam-2-video:4cf1856c

Input schema

The fields you can use to run this model with an API. If you don’t give a value for a field its default value will be used.

Field Type Default value Description
input_video
string
Path to the input video file
click_coordinates
string
List of click coordinates in format '[x,y],[x,y],...'
click_labels
string
List of click types (1 for foreground, 0 for background), e.g., '1,1,0,1'
click_frames
string
List of frame indices for each click, e.g., '0,0,150,0'
click_object_ids
string
List of object IDs for each click, e.g., '1,1,1,2'
mask_type
string (enum)
binary

Options:

binary, highlighted, greenscreen

Type of mask to generate: binary (black and white), highlighted (original with colored overlay), or greenscreen (foreground with green background)
output_video
boolean
False
Generate video output (True) or image sequence (False)
video_fps
integer
30

Min: 1

Max: 60

Frames per second for video output (ignored for image sequence)
output_format
string (enum)
webp

Options:

webp, jpg, png

Image format for sequence output (ignored for video)
output_quality
integer
80

Max: 100

Compression quality (0-100) for JPG/WebP in image sequence (ignored for PNG and video)
output_frame_interval
integer
1
Interval for output frames. 1 for every frame, 2 for every other frame, etc.

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{'items': {'format': 'uri', 'type': 'string'},
 'title': 'Output',
 'type': 'array',
 'x-cog-array-type': 'iterator'}