falAudio to audioAvailable now

fal-ai/sam-audio/separate

fal-ai/sam-audio/separate is an audio to audio tool from fal that runs in the background and returns audio. Pay as you go from $0.0325 per 30 seconds, with one API key.

Try itfrom $0.0325 / 30 seconds

Pricing

$0.065 per 30 seconds of audio, minimum 30 seconds. Each extra reranking_candidates adds $0.0325 per 30 seconds. Measured from the input file. The final charge comes from usage.

Limits

Runs
In the background
Returns
audio
Longest queue wait
3600s
Run deadline
1800s
Largest inline input
1024 KB
Largest input file
500 MB
Largest output
4768 MB
Outputs per run
16

Input

FieldKindDefaultDescription
audio_url requiredURL or file—URL of the audio file to process (WAV, MP3, FLAC supported)
prompt requiredtext—Text prompt describing the sound to isolate.
predict_spanstrue or falsefalseAutomatically predict temporal spans where the target sound occurs.
reranking_candidatesnumber (whole)
1 to 7
1Number of candidates to generate and rank. Higher improves quality but increases latency and cost.
accelerationone of
fast, balanced, quality
balancedThe acceleration level to use.
max_chunk_durationnumber
10 to 60
60Maximum audio duration (in seconds) to process in a single pass. Longer audio will be chunked with overlap and blended.
chunk_overlapnumber
0 to 30
5Overlap duration (in seconds) between chunks for crossfade blending.
output_formatone of
wav, mp3
wavOutput audio format.

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "fal",
    "model": "fal-ai/sam-audio/separate",
    "input": {
      "audio_url": "https://v3b.fal.media/files/b/0a88511f/tUUCI9eDmeC2RqJEOXrZk_assets_avatar_multi_sing_woman.WAV",
      "prompt": "piano playing"
    }
  }'