Sand AISand AI MAGI-2MAGI-2 теперь на SandBase: видео 1080p с нативным звукомПопробовать сейчас

SAM Audio Span Separate

meta/sam-audio/span-separate

SAM Audio by Meta isolates a sound using time spans that mark where it occurs, optionally guided by a text description. It returns the isolated target and the residual audio, either full length or trimmed to the spans.

Базовая цена
$0.05USD / запуск
Выполнение
async
Тип модели
audio
Поля ввода
7
Маршрут продакшена

Попробовать модель

Песочница

Открыть playground
Ввод
Audio file or URL to process.
Time spans where the target sound occurs. Each item has `start` and `end` in seconds and `include` (true to isolate sounds in this span, false to exclude them).
Optional but recommended text describing the sound to isolate.
Trim the output to the span time range. If false, returns the full audio length with the target isolated throughout.
Rank reranking candidates by how well their non-silent regions match the spans. Works without a prompt; requires `reranking_candidates` > 1.
17
Number of candidates to generate and rank (1–7). Higher improves quality but adds $0.025 per 30 s per extra candidate. Диапазон: от 1 до 7.
Output audio format.
ВыходГотово

Ваш результат появится здесь

Заполните входные данные, затем нажмите «Запустить».

Карточка модели

Характеристики

Цены

Базовая цена
$0.05 / запуск

Контекст и модальности

Вход
Определяется схемой
Выход
audio

Возможности

Чат
Не поддерживается
Зрение
Не поддерживается
Рассуждение
Не поддерживается
Структурированный вывод
Не поддерживается
Вызов функций
Не поддерживается
Аудиовход
Не поддерживается

Доступ

Провайдер
Meta
ID модели
meta/sam-audio/span-separate
Выполнение
async
Базовый URL
https://api.sandbase.ai
API
Unified Run API
Эндпоинт
/v1/run

README по API

SAM Audio Span Separate

SAM Audio isolates a sound from the time spans where it occurs, with an optional text hint, and returns it with the residual track.

Fields

FieldTypeDefaultNotes
audioaudio file or URL, required—Recording to separate.
spansarray of {start, end, include}, required—Time ranges in seconds; include: false marks ranges to exclude.
promptstring—Optional hint about the sound.
trim_to_spanbooleanfalseReturn only the span range instead of the full length.
use_sound_activity_rankingbooleanfalseRank candidates by match to the spans; needs more than one candidate.
reranking_candidatesinteger 1–71Extra candidates improve quality; each adds $0.025 per 30 s.
output_formatwav / mp3wavOutput file format.

Output

FieldNotes
urlIsolated target sound.
residual_urlEverything else (the input minus the target).
durationOutput length in seconds.

Billing

$0.05 per started 30 seconds of output audio (shorter with trim_to_span), plus $0.025 per 30 seconds for each extra reranking candidate. The final charge uses the measured output length; the quote uses the input length (10 minutes if it cannot be read).

AudioPrice
30 s, 1 candidate$0.05
2 min, 1 candidate$0.20
2 min, 3 candidates$0.40

Failed runs are not charged.

Prompting

  • Mark a span where the target is clearly audible; add a short prompt such as dog barking for better results.

Also on SandBase

Related: meta/sam-audio/separate, meta/sam-audio/visual-separate.

Начните разработку

Отправьте свой первый запрос

Совместимая с OpenAI конечная точка с единообразной аутентификацией и учётом использования.

Production API
конечная точка Unified Run API
https://api.sandbase.ai/v1/run
ID модели
meta/sam-audio/span-separate
# 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/span-separate",
  "audio": "https://v3b.fal.media/files/b/0a8853d1/T7zRmsiculA6u_V6RCF2c_man.mp3",
  "spans": [
    [
      {
        "end": 10,
        "start": 6,
        "include": true
      }
    ]
  ],
  "prompt": "man singing",
  "trim_to_span": false,
  "output_format": "wav",
  "reranking_candidates": 1,
  "use_sound_activity_ranking": false
}
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"
01

Схема ввода

7 параметров · 2 обязательных · 5 необязательных

ПараметрТипОбязательныйОписание
audiostringОбязательныйAudio file or URL to process.
spansobject[]ОбязательныйTime spans where the target sound occurs. Each item has `start` and `end` in seconds and `include` (true to isolate sounds in this span, false to exclude them).
promptstringНеобязательныйOptional but recommended text describing the sound to isolate.
trim_to_spanbooleanНеобязательныйTrim the output to the span time range. If false, returns the full audio length with the target isolated throughout. · По умолчанию: false
output_formatstringНеобязательныйOutput audio format. · Параметры: wav, mp3 · По умолчанию: "wav"
wavmp3
reranking_candidatesintegerНеобязательныйNumber of candidates to generate and rank (1–7). Higher improves quality but adds $0.025 per 30 s per extra candidate. · Мин.: 1 · Макс.: 7 · По умолчанию: 1
use_sound_activity_rankingbooleanНеобязательныйRank reranking candidates by how well their non-silent regions match the spans. Works without a prompt; requires `reranking_candidates` > 1. · По умолчанию: false
02

Схема вывода

ПолеТипОписание
idstringУникальный идентификатор задачи генерации
statusstringСтатус задачи: pending, running, completed, failed, timeout
modelstringМодель, использованная для генерации
outputsarrayМассив элементов вывода
outputs[].urlstringURL сгенерированного артефакта
outputs[].content_typestringMIME-тип (например, image/png, video/mp4)
errorobject | nullСведения об ошибке, если не удалось; null при успехе
error.typestringКод ошибки для машинной обработки
error.messagestringОписание ошибки, понятное человеку

Асинхронный workflow

Эта модель работает асинхронно. Отправьте запрос, затем опрашивайте результат.

  1. Отправка: выполните POST на /v1/run и прочитайте возвращаемое id.
  2. Опрос: выполняйте GET /v1/run/{id}, пока статус не станет completed, failed или timeout.
  3. Получение: прочитайте outputs из завершенного ответа.

Выберите свою модель

Сравнить модели

Все модели для изображений и видео
МодельТипЦена по умолчаниюВыпущена
SAM Audio Span SeparateЭта модель
Meta
Аудио$0.05 / запуск30 дек. 2025 г.
MetaАудио$0.05 / запуск30 дек. 2025 г.
MetaАудио$0.05 / запуск30 дек. 2025 г.
MetaАудио$0.04 / запуск27 окт. 2025 г.

Вопросы

FAQ

Как вызвать Meta SAM Audio Span Separate через SandBase?

Создайте API key SandBase, затем отправляйте запросы с идентификатором модели "meta/sam-audio/span-separate" на Unified Run API (/v1/run) по адресу https://api.sandbase.ai. Примеры запросов на этой странице показывают точный payload.

Нужен ли мне отдельный аккаунт Meta?

Нет. Один API key SandBase и один баланс дают вам доступ к Meta SAM Audio Span Separate и другим моделям в каталоге; отдельно регистрироваться в Meta не нужно.