SAM 3 is a unified foundation model for promptable segmentation in images and videos.
pip install requestsimport requests
response = requests.post(
"https://api.runflow.io/v1/run/sam-3/image",
headers={"Authorization": "Bearer RUNFLOW_API_KEY"},
json={
"prompt": "keyboard",
"image_url": "https://v3b.fal.media/files/b/0a92a995/fV5oYdcCV3NAmgWJISpIP_tmpdddcks4v.png",
"apply_mask": false,
"return_multiple_masks": true
},
)
data = response.json()
print(data["image"]["url"])| Parameter | Type | Description |
|---|---|---|
| prompt | string | Text prompt for segmentation |
| include_boxes | boolean | Whether to include bounding boxes for each mask (when available). |
| include_scores | boolean | Whether to include mask confidence scores. |
| return_multiple_masks | boolean | If True, upload and return multiple generated masks as defined by `max_masks`. |
| image_url | image | URL of the image to be segmented |
| sync_mode | boolean | If True, the media will be returned as a data URI. |
| point_prompts | string | List of point prompts |
| output_format | string | The format of the generated image. |
| max_masks | integer | Maximum number of masks to return when `return_multiple_masks` is enabled. |
| box_prompts | string | Box prompt coordinates (x_min, y_min, x_max, y_max). Multiple boxes supported - use object_id to group boxes for the same object or leave empty for separate objects. |
| apply_mask | boolean | Apply the mask on the image. |
| text_prompt | string | [DEPRECATED] Use 'prompt' instead. Kept for backward compatibility. |
| Field | Type | Description |
|---|---|---|
| image | string | Primary segmented mask preview. |
| metadata | string | Per-mask metadata including scores and boxes. |
| masks | json | Segmented mask images. |
| scores | string | Per-mask confidence scores when requested. |
| boxes | string | Per-mask normalized bounding boxes [cx, cy, w, h] when requested. |
FLUX.2 [klein] 9B — Edit
black-forest-labs/flux-2-klein-9b/edit
Image-to-image editing with FLUX.2 [klein] 9B from Black Forest Labs. Precise mo...
Reve Edit
reve/edit
Reve's edit model lets you upload an existing image and then transform it via a ...
Wan 2.7 Pro Edit
alibaba/wan/v2.7/pro/edit
Edit and transform images using text instructions with the WAN 2.7 Pro model for...
Nano Banana 2 — Edit
google/nano-banana-2/edit
Nano Banana 2 is Google's new state-of-the-art image generation and editing mode...
Get API access in minutes. No GPU setup, no infrastructure to manage.