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

  1. Upload a video to StableUpload.
  2. Inspect the local file and compute its frame count.
  3. POST the StableUpload URL and declared frame count to /api/segment.
  4. Poll /api/jobs/{jobId} with SIWX until complete.

MVP limits

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