SAM Audio · Text-Prompted Sound Separation
fal-ai/sam-audio/separateEdit and transform audio with SAM Audio · Text-Prompted Sound Separation from fal through one Spiral API key. Isolates one sound in an audio file, such as a voice or an instrument, from a short text description and returns it as a track. It runs in the background and returns audio. Pay as you go, with no subscription.
Pricing
$0.065 per 30 seconds of audio, at least 30 seconds. Each extra reranking candidate: $0.0325 per 30 seconds.
Limits
- Runs
- In the background
- Returns
- audio
- Longest queue wait
- 1 hour
- Run deadline
- 30 minutes
- Longest run, end to end
- 255 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
audio_url required | URL or file | — | URL of the audio file to process (WAV, MP3, FLAC supported) |
prompt required | text | — | Text prompt describing the sound to isolate. |
predict_spans | true or false | false | Automatically predict temporal spans where the target sound occurs. |
reranking_candidates | number (whole) 1 to 7 | 1 | Number of candidates to generate and rank. Higher improves quality but increases latency and cost. |
acceleration | one of fast, balanced, quality | balanced | The acceleration level to use. |
max_chunk_duration | number 10 to 60 | 60 | Maximum audio duration (in seconds) to process in a single pass. Longer audio will be chunked with overlap and blended. |
chunk_overlap | number 0 to 30 | 5 | Overlap duration (in seconds) between chunks for crossfade blending. |
output_format | one of wav, mp3 | wav | Output 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"
}
}'Frequently asked questions
How much does SAM Audio · Text-Prompted Sound Separation cost?
$0.065 per 30 seconds of audio, at least 30 seconds. Each extra reranking candidate: $0.0325 per 30 seconds. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use SAM Audio · Text-Prompted Sound Separation through an API?
Send `POST /v1/runs` with `"provider": "fal"`, `"model": "fal-ai/sam-audio/separate"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with fal to use SAM Audio · Text-Prompted Sound Separation?
No. Spiral runs it on its own fal account and charges your Spiral balance.
Can my AI agent use SAM Audio · Text-Prompted Sound Separation?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.