StableSAM Docs
StableSAM is an API-first SAM 3 video segmentation service. The MVP requires StableUpload public URLs and a client-provided declared frame count.
Workflow
- Upload a video to StableUpload.
- Inspect the local file and compute its frame count.
- POST the StableUpload URL and declared frame count to
/api/segment. - Poll
/api/jobs/{jobId}with SIWX until complete.
MVP limits
- Maximum declared frame count: 960
- Maximum upload size: 100 MB
- Video URL must be a StableUpload public URL
- Segmented output is silent and does not preserve the source audio track
Pricing
Fal posts SAM 3 at $0.005 per 16 frames. StableSAM charges dynamic route pricing at a 2x markup based on declaredFrameCount.
Example request
{
"type": "sam-3-video-segment",
"videoUrl": "https://f.stableupload.dev/abc123/clip.mp4",
"declaredFrameCount": 320,
"prompt": "person, skateboard",
"pointPrompts": [],
"boxPrompts": [],
"applyMask": true,
"videoOutputType": "mp4",
"detectionThreshold": 0.5
}Endpoints
POST /api/segment— paid create routeGET /api/jobs— SIWX list routeGET /api/jobs/{jobId}— SIWX status routeDELETE /api/jobs/{jobId}— SIWX soft-delete route