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.
- Cena bazowa
- $0.05USD / uruchomienie
- Wykonanie
- async
- Typ modelu
- audio
- Pola wejściowe
- 5
Wypróbuj model
Playground
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
Karta modelu
Specyfikacja
Cennik
- Cena bazowa
- $0.05 / uruchomienie
Kontekst i modalności
- Wejście
- Zdefiniowane przez schemat
- Wyjście
- audio
Możliwości
- Czat
- Nieobsługiwane
- Wizja
- Nieobsługiwane
- Rozumowanie
- Nieobsługiwane
- Ustrukturyzowany wynik
- Nieobsługiwane
- Wywoływanie funkcji
- Nieobsługiwane
- Wejście audio
- Nieobsługiwane
Dostęp
- Dostawca
- Meta
- ID modelu
- meta/sam-audio/visual-separate
- Wykonanie
- async
- Bazowy URL
- https://api.sandbase.ai
- API
- Unified Run API
- Endpoint
- /v1/run
README API
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.
Zacznij tworzyć
Wyślij pierwsze żądanie
Kompatybilny z OpenAI endpoint z jednolitym uwierzytelnianiem i śledzeniem użycia.
# 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"Schemat wejścia
5 parametrów · 1 wymaganych · 4 opcjonalnych
| Parametr | Typ | Wymagane | Opis |
|---|---|---|---|
video | string | Wymagane | Video file or URL to process (MP4, MOV, etc.). |
prompt | string | Opcjonalne | Optional text describing the target sound or object. · Domyślnie: "" |
mask_video | string | Opcjonalne | Optional mask video file or URL marking the target object (black = target, white = background). |
output_format | string | Opcjonalne | Output audio format. · Opcje: wav, mp3 · Domyślnie: "wav" wavmp3 |
reranking_candidates | integer | Opcjonalne | Number of candidates to generate and rank (1–4). Higher improves quality but adds $0.025 per 30 s per extra candidate. · Min.: 1 · Maks.: 4 · Domyślnie: 1 |
Schemat wyjścia
| Pole | Typ | Opis |
|---|---|---|
id | string | Unikalny identyfikator zadania generowania |
status | string | Status zadania: pending, running, completed, failed, timeout |
model | string | Model użyty do generowania |
outputs | array | Tablica elementów wyjściowych |
outputs[].url | string | URL wygenerowanego artefaktu |
outputs[].content_type | string | Typ MIME (np. image/png, video/mp4) |
error | object | null | Szczegóły błędu, jeśli wystąpił; null w przypadku powodzenia |
error.type | string | Maszynowo czytelny kod typu błędu |
error.message | string | Opis błędu czytelny dla człowieka |
Asynchroniczny przepływ pracy
Ten model działa asynchronicznie. Wyślij żądanie, a następnie odpytyuj o wynik.
- Wyślij: wykonaj POST do /v1/run i odczytaj zwrócone
id. - Odpytywanie: wykonuj GET /v1/run/{id}, aż status będzie równy
completed,failedlubtimeout. - Pobierz: odczytaj
outputsz ukończonej odpowiedzi.
Wybierz swój model
Porównaj modele
| Model | Typ | Cena domyślna | Wydano |
|---|---|---|---|
SAM Audio Visual SeparateTen model Meta | Audio | $0.05 / uruchomienie | 30 gru 2025 |
Meta | Audio | $0.05 / uruchomienie | 30 gru 2025 |
Meta | Audio | $0.05 / uruchomienie | 30 gru 2025 |
Meta | Audio | $0.04 / uruchomienie | 27 paź 2025 |
Pytania
FAQ
Jak wywołać Meta SAM Audio Visual Separate przez SandBase?
Utwórz klucz API SandBase, a następnie wysyłaj żądania z identyfikatorem modelu "meta/sam-audio/visual-separate" do Unified Run API (/v1/run) na https://api.sandbase.ai. Przykłady żądań na tej stronie pokazują dokładny payload.
Czy potrzebuję osobnego konta Meta?
Nie. Jeden klucz API SandBase i saldo daje Ci dostęp do Meta SAM Audio Visual Separate oraz innych modeli w katalogu; nie musisz osobno zakładać konta u Meta.
