sam3_predict
Analyze an image with SAM3 segmentation to generate object masks, bounding boxes, and scores based on a text prompt. Accepts local files, URLs, or base64-encoded images.
Instructions
Analyze an image using the SAM3 segmentation API to generate inference results (masks, boxes, scores). The image can be provided in one of three ways:
imagePath: Absolute path of a local image file (e.g. C:\Users\xxx\photo.png). Use this when the user provides a local file path.
imageUrl: Publicly accessible URL of the image (e.g. https://example.com/photo.jpg). Use this when the user provides a web link.
imageBase64: Base64-encoded image data. Use this when the user uploads or drags-and-drops an image as an attachment and no local path is available. In this case, encode the image content as base64 and pass it via this parameter. If the user mentions an uploaded image but does not provide a path, URL, or base64 data, ask the user for the local absolute path. Prompt must be in English. If the user provides Chinese or other non-English text, translate it to English before calling this tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| imagePath | No | Absolute path of a local image file (e.g. C:\\Users\\xxx\\photo.png) | |
| imageUrl | No | Publicly accessible URL of the image to process | |
| imageBase64 | No | Base64-encoded image data. Use this when the image is provided as an attachment without a local path | |
| prompt | Yes | Text prompt for mask generation. Must be in English. If the user provides Chinese or other non-English text, translate it to English before calling this tool |