All models
Imagev1.0.0
Segment Anything 2 (Masks)
Segment every region of an image into one combined mask.
4 inputsIMAGE


Every region segmented into one mask
Output
Fill in the inputs and run the node to see its output here.
Run it from your code
The same node, called by id from any surface. Every tab pins sam-2 and passes the ports below. Full guide.
import { BlitClient } from "@blitflow/sdk";
const { runNode } = new BlitClient({ apiKey: process.env.BLITFLOW_TOKEN });
const { outputs } = await runNode("sam-2", {
image: { ref: "https://..." },
pointsPerSide: { value: 32 },
iouThreshold: { value: 0.88 },
stabilityThreshold: { value: 0.95 },
});# Install once, then sign in
npm install -g blitflow
blitflow login
blitflow node sam-2 \
-i image=@https://... \
-i pointsPerSide=32 \
-i iouThreshold=0.88 \
-i stabilityThreshold=0.95{
"name": "runs_node",
"arguments": {
"node": "sam-2",
"inputs": {
"image": {
"ref": "https://..."
},
"pointsPerSide": {
"value": 32
},
"iouThreshold": {
"value": 0.88
},
"stabilityThreshold": {
"value": 0.95
}
}
}
}curl https://studio.blitflow.com/api/v1/runs/node \
-H "Authorization: Bearer $BLITFLOW_TOKEN" \
-H "Content-Type: application/json" \
-d '{"node":"sam-2","inputs":{"image":{"ref":"https://..."},"pointsPerSide":{"value":32},"iouThreshold":{"value":0.88},"stabilityThreshold":{"value":0.95}}}'Schema
Inputs
| image* | IMAGE | ||
| pointsPerSide | INT | 32 | |
| iouThreshold | FLOAT | 0.88 | |
| stabilityThreshold | FLOAT | 0.95 |
Outputs
| mask | IMAGE |