SAM Audio Visual Separate
meta/sam-audio/visual-separateSAM Audio by Meta isolates the sound of an object or person in a video, guided by an optional mask video and text description. It returns the isolated target and the residual audio as separate files.
- Base price
- $0.05USD / run
- Execution
- async
- Model type
- audio
- Input fields
- 5
Try the model
Playground
Your output will appear here
Complete the inputs, then click Run.
Model card
Specifications
Pricing
- Base price
- $0.05 / run
Context & modalities
- Input
- Schema-defined
- Output
- audio
Capabilities
- Chat
- Not supported
- Vision
- Not supported
- Reasoning
- Not supported
- Structured output
- Not supported
- Function calling
- Not supported
- Audio input
- Not supported
Access
- Provider
- Meta
- Model ID
- meta/sam-audio/visual-separate
- Execution
- async
- Base URL
- https://api.sandbase.ai
- API
- Unified Run API
- Endpoint
- /v1/run
API README
SAM Audio Visual Separate
SAM Audio isolates the sound made by an object or person in a video, guided by an optional mask video and prompt.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
video | video file or URL, required | — | Source video (MP4, MOV). |
prompt | string | empty | Hint about the target, for example man on the left. |
mask_video | video file or URL | — | Binary mask video: black is the target, white the background. |
reranking_candidates | integer 1–4 | 1 | Extra candidates improve quality; each adds $0.025 per 30 s. |
output_format | wav / mp3 | wav | Output file format. |
Output
| Field | Notes |
|---|---|
url | Isolated target sound. |
residual_url | Everything else (the input minus the target). |
duration | Output length in seconds. |
Billing
$0.05 per started 30 seconds of output audio, plus $0.025 per 30 seconds for each extra reranking candidate. The final charge uses the measured output length; the quote uses the video length (10 minutes if it cannot be read).
| Video | Price |
|---|---|
| 30 s, 1 candidate | $0.05 |
| 2 min, 1 candidate | $0.20 |
| 2 min, 4 candidates | $0.50 |
Failed runs are not charged.
Prompting
- Describe the target by position or appearance, for example
woman in the red jacket.
Also on SandBase
Related: meta/sam-audio/separate, meta/sam-audio/span-separate.
Start building
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
# 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-audio/visual-separate",
"video": "https://v3b.fal.media/files/b/0a8850d1/gff7zKI-6XwIbBBip4946_office.mp4",
"prompt": "man on the left",
"output_format": "wav",
"reranking_candidates": 1
}
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"Input Schema
5 parameters · 1 required · 4 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
video | string | Required | Video file or URL to process (MP4, MOV, etc.). |
prompt | string | Optional | Optional text describing the target sound or object. · Default: "" |
mask_video | string | Optional | Optional mask video file or URL marking the target object (black = target, white = background). |
output_format | string | Optional | Output audio format. · Options: wav, mp3 · Default: "wav" wavmp3 |
reranking_candidates | integer | Optional | Number of candidates to generate and rank (1–4). Higher improves quality but adds $0.025 per 30 s per extra candidate. · Min: 1 · Max: 4 · Default: 1 |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model runs asynchronously. Submit a request, then poll for the result.
- Submit: POST to /v1/run and read the returned
id. - Poll: GET /v1/run/{id} until status is
completed,failedortimeout. - Retrieve: read
outputsfrom the completed response.
Choose your model
Compare models
| Model | Type | Default price | Released |
|---|---|---|---|
SAM Audio Visual SeparateThis model Meta | Audio | $0.05 / run | Dec 30, 2025 |
Meta | Audio | $0.05 / run | Dec 30, 2025 |
Meta | Audio | $0.05 / run | Dec 30, 2025 |
Meta | Audio | $0.04 / run | Oct 27, 2025 |
Questions
FAQ
How do I call Meta SAM Audio Visual Separate through SandBase?
Create a SandBase API key, then send requests with the model ID "meta/sam-audio/visual-separate" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.
Do I need a separate Meta account?
No. One SandBase API key and balance gives you access to Meta SAM Audio Visual Separate and the other models in the catalog; you do not need to sign up with Meta separately.
