Skip to content

Sam Audio · Separate

Integrate

Model id sam-audio/separate
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/sam-audio/separate?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Files like the example: $0.05 50 API credits · ≈ ₽5.27 your files are measured before the run Run it on this page

Get API key
Meta Audio 10–60 s #audio-to-audio#sam-audio

Isolates a sound from an audio file using a text description, returning target and residual tracks

Meta · Data (JSON)

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Text description of the sound targeted for isolation.

•required audio_url
Drop a file, or

Audio file URL for processing; supported formats are WAV, MP3, and FLAC.

default 1

Count of candidates generated for ranking.

Advanced acceleration · output_format · max_chunk_duration · chunk_overlap · predict_spans
acceleration default balanced

Acceleration level applied to processing.

output_format default wav

Format for the generated audio.

default 60

Per-pass audio limit, measured in seconds, beyond which processing uses overlapping chunks that are blended together.

default 5

Length of the overlap between chunks, measured in seconds, used for crossfade blending.

POST /run/sam-audio/separate?wait=20 quote → $0.05
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/sam-audio/separate?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Sam Audio · Separate

Give it an `audio_url` (WAV, MP3 or FLAC) and a `prompt` naming the sound to extract. The output has a `target` track with the isolated sound and a `residual` track with everything else. Options include `predict_spans`, up to 7 `reranking_candidates`, an `acceleration` level, chunking of long audio (10 to 60 seconds per pass) and wav or mp3 output.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
audio_urlrequired audio
Typeurl · audio
Audio file URL for processing; supported formats are WAV, MP3, and FLAC.
promptrequired
Typestring
Text description of the sound targeted for isolation.
predict_spansoptional
Typeboolean
Defaultfalse
Automatic prediction of time intervals containing the target sound.
reranking_candidatesoptional
Typeinteger
Default1
1 – 7
Count of candidates generated for ranking.
accelerationoptional
Typeenum
Defaultbalanced
fastbalancedquality
Acceleration level applied to processing.
max_chunk_durationoptional
Typenumber
Default60
10 – 60
Per-pass audio limit, measured in seconds, beyond which processing uses overlapping chunks that are blended together.
chunk_overlapoptional
Typenumber
Default5
0 – 30
Length of the overlap between chunks, measured in seconds, used for crossfade blending.
output_formatoptional
Typeenum
Defaultwav
wavmp3
Format for the generated audio.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "sam-audio/separate",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 50,
    "usd": "0.05",
    "charged": 50,
    "refunded": 0
  },
  "input": {
    "audio_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "target": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    },
    "residual": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    },
    "duration": 5,
    "sample_rate": 48000
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
target
object {url, content_type, file_name, file_size}Target sound extracted in isolation.
residual
object {url, content_type, file_name, file_size}Audio remaining apart from the target sound.
duration
numberOutput audio length, measured in seconds.
sample_rate
integerSampling frequency in Hz for the output audio.

More models: Audio

For AI agents: this page as Markdown is at https://doitong.com/en-US/developers/models/sam-audio/separate.md. All models and guides: https://doitong.com/developers/llms.txt