imagestring필수
URL of the image to be segmented
meta/sam-3/imageSAM 3 Image is Meta's segmentation model. It finds objects in an image from a text, point, or box prompt and returns masks and the masked image, with optional confidence scores.
모델 사용해 보기
PNG, JPEG, WebP 또는 GIF · 최대 20 MiB
출력이 여기에 표시됩니다
입력을 완료한 다음 Run을 클릭하세요.
SAM 3 segments objects in an image from a text, point, or box prompt and returns masks.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | wheel | What to segment, e.g. “the red car”. |
image | image URL, required | — | Image to segment. JPEG, PNG, or WebP URL. |
output_format | jpeg / png | png | Output file format. |
box_prompts | item[] | [] | Optional boxes. |
text_prompt | string | — | [DEPRECATED] Use 'prompt' instead. |
include_scores | boolean | false | Whether to include mask confidence scores. |
apply_mask | boolean | true | Return the masked image. |
point_prompts | item[] | [] | Optional points. |
return_multiple_masks | boolean | false | If True, upload and return multiple generated masks as defined by max_masks. |
max_masks | integer 1–32 | 3 | Maximum masks to return. |
include_boxes | boolean | false | Whether to include bounding boxes for each mask (when available). |
$0.005 per image.
| Request | Price |
|---|---|
| One image | $0.005 |
Failed runs are not charged.
Related: meta/sam-3/3d-objects.
빌드를 시작하세요
SandBase Unified Run API를 통해 이 모델을 제출하세요.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "meta/sam-3/image",
"image": "https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/notebooks/images/truck.jpg",
"prompt": "wheel",
"max_masks": 3,
"apply_mask": true,
"box_prompts": [],
"include_boxes": false,
"output_format": "png",
"point_prompts": [],
"include_scores": false,
"return_multiple_masks": false
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"SandBase API 키를 생성해 서버 환경에 설정하세요. 모든 요청에는 Bearer 인증이 사용됩니다.
export SANDBASE_API_KEY="YOUR_API_KEY"키는 서버에 보관하세요. 브라우저 코드에 노출하거나 저장소에 커밋하지 마세요.
이 모델 ID와 입력값을 사용해 /v1/run로 POST하세요. 위의 요청 예시에는 제출과 폴링이 포함되어 있습니다.
반환된 실행 ID를 사용해 상태가 completed, failed 또는 timeout이 될 때까지 폴링하세요. completed 이후에만 출력을 읽으세요.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"모델의 이미지, 비디오 또는 오디오 필드에 공개적으로 접근 가능한 파일 URL을 전달하세요. 지원 형식과 제한은 각 Playground 입력 옆에 표시됩니다.
Playground의 지원되는 이미지 필드에서 업로드 또는 교체 컨트롤을 사용하세요. 비디오 URL 필드는 호스팅된 driving video를 받으며, 비디오 업로드 지원을 의미하지는 않습니다.
imagestring필수URL of the image to be segmented
promptstring필수Text prompt for segmentation
기본값: "wheel"
max_masksintegerMaximum number of masks to return when `return_multiple_masks` is enabled.
기본값: 3
최소값: 1
최대값: 32
apply_maskbooleanApply the mask on the image.
기본값: true
box_promptsarrayBox 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.
기본값: []
text_promptstring[DEPRECATED] Use 'prompt' instead. Kept for backward compatibility.
include_boxesbooleanWhether to include bounding boxes for each mask (when available).
기본값: false
output_formatstringThe format of the generated image.
기본값: "png"
가능한 값: "jpeg", "png"
point_promptsarrayList of point prompts
기본값: []
include_scoresbooleanWhether to include mask confidence scores.
기본값: false
return_multiple_masksbooleanIf True, upload and return multiple generated masks as defined by `max_masks`.
기본값: false
{
"model": "meta/sam-3/image",
"image": "https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/notebooks/images/truck.jpg",
"prompt": "wheel",
"max_masks": 3,
"apply_mask": true,
"box_prompts": [],
"include_boxes": false,
"output_format": "png",
"point_prompts": [],
"include_scores": false,
"return_multiple_masks": false
}완료된 실행의 결과는 출력에 표시됩니다. 아래 내용은 새 생성 결과가 아니라 모델에 저장된 예시입니다.
예시 출력이 아직 게시되지 않았습니다. 완료된 실행 후 Playground → Result → JSON에서 응답을 확인하세요.