How to Use Stable Audio 3 Small Music Base Text to Audio in opencode
Create instrumental music up to two minutes long from a written brief. Unlike Stable Audio 3 Small Music Base Audio to Audio, it starts without a recording; Stability AI positions Base as a checkpoint for fine-tuning.
Prompts to try with Stable Audio 3 Small Music Base Text to Audio in opencode
Copy an example into opencode, or ask in your own words.
Read the game's menu design notes and use Stable Audio 3 Small Music Base Text to Audio to create a 90-second instrumental cue: quiet analog synths, sparse piano, reflective mood, 80 BPM.
Use Stable Audio 3 Small Music Base Text to Audio to make a 45-second soundtrack for the product walkthrough described in the README: light electronic instrumental, muted percussion, warm bass, calm confidence, 100 BPM.
Review the project's trailer brief and use Stable Audio 3 Small Music Base Text to Audio to draft 60 seconds of tense instrumental music with low strings, restrained percussion, and a steady 90 BPM pulse.
Compose a 30-second upbeat lo-fi track with Stable Audio 3 Small Music Base Text to Audio for a product video. Save the result in ./assets.
Make a calm piano loop with Stable Audio 3 Small Music Base Text to Audio for a meditation app.
How to set up Stable Audio 3 Small Music Base Text to Audio in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Stable Audio 3 Small Music Base Text to Audio
One request; the result comes back by polling or a webhook.
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/stable-audio-3/small/music/base/text-to-audio", "input": { "prompt": "An anthemic Pop Rock instrumental that fills your head with nostalgic thoughtfulness" } }'
Then paste one of the prompts above: opencode finds Stable Audio 3 Small Music Base Text to Audio on Spiral, shows the price and runs it.
Stable Audio 3 Small Music Base Text to Audio providers and prices
Spiral runs Stable Audio 3 Small Music Base Text to Audio through fal. Open a card for today's price, with every fee included.
Settings you can ask for
Stable Audio 3 Small Music Base Text to Audio works from your prompt. Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Negative prompt | what to leave out, in words | Text description of qualities to avoid in the output. | |
| Duration | 1 to 120 | 30 | Duration of the generated audio in seconds. |
| Number of inference steps | 1 to 100 | 50 | Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. |
| Guidance scale | 0 to 25 | 7 | Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. |
| Seed | a whole number | Random seed for reproducible outputs. Omit for a random seed. | |
| Enable prompt expansion | on or off | off | If True, the prompt will be expanded using an LLM for more detailed and higher quality results. |
| Output format | mp3, wav, flac, ogg, opus, m4a, or aac | mp3 | Container format for the generated audio output. |
Every API field of Stable Audio 3 Small Music Base · Text to Audio is on its tool page: open its card above.
What can you do with Stable Audio 3 Small Music Base Text to Audio in opencode?
Create instrumental music drafts for games, demos, and recorded walkthroughs from the project's creative brief. A coding agent can turn scene descriptions into specific music requests and organize cues up to two minutes long.
Podcast background music
Draft a restrained instrumental bed under spoken audio, either from a written brief or by restyling a supplied music recording. Try soft piano, sparse percussion, and low energy.
Product demo soundtracks
Create a 30- to 60-second instrumental cue for a screen recording. Start with a music brief or an existing recording, and describe the desired instruments and energy.
Game menu music
Explore up to two minutes of instrumental music for a game's menu or lobby. Generate from a description or use a supplied recording as the starting point; audition the result against the scene.
Short film score sketches
Test a scene's musical direction before recording a score. Describe a tense string arrangement or quiet piano cue, or restyle a supplied music sketch toward that direction.
Presentation music
Prepare a short instrumental cue for an opening slide or recorded presentation. Work from a written description or supplied music, keeping the arrangement sparse enough to audition alongside narration.
Music direction comparisons
Compare jazz, electronic, and acoustic treatments of a creative brief. Generate separate text-based drafts or apply each direction to the same supplied recording.
More on Stable Audio 3 Small Music Base Text to Audio and opencode
Overview
Stable Audio 3 Small Music Base Text to Audio in other agents
Questions about Stable Audio 3 Small Music Base Text to Audio in opencode
Can opencode use Stable Audio 3 Small Music Base Text to Audio?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Stable Audio 3 Small Music Base Text to Audio like any built-in tool.
How much does Stable Audio 3 Small Music Base Text to Audio cost in opencode?
$0.03653 per run at the default inputs. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.
Do I need a fal account to use Stable Audio 3 Small Music Base Text to Audio in opencode?
No. Spiral runs Stable Audio 3 Small Music Base Text to Audio on its own fal account. You sign in to Spiral once and never paste a key.
How long does it take to set up Stable Audio 3 Small Music Base Text to Audio in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while Stable Audio 3 Small Music Base Text to Audio runs?
Stable Audio 3 Small Music Base Text to Audio runs in the background. opencode starts the run, checks on it and gives you the audio when it's ready.
What is Stable Audio 3 Small Music Base useful for?
Use it to explore instrumental music ideas for video, podcasts, games, and demos, with clips up to two minutes long. Base is the pretrained checkpoint that Stability AI positions for fine-tuning.
How long can the music be?
Stable Audio 3 Small Music Base supports music up to 120 seconds long. Keep each requested cue within that limit.
Can it sing lyrics or record narration?
Stable Audio 3 is intended for instrumental audio, and it is not designed for voice generation. Its prompting guide warns that vocal sounds can be unintelligible, so use it for the music underneath speech.
What should I include in a music prompt?
Describe the genre, instruments, mood, energy, and desired tempo in BPM. For example: mellow jazz instrumental, brushed drums, upright bass, soft piano, restrained energy, 85 BPM.
Which generation settings deserve attention?
Start around 50 sampling steps and guidance 7 for Stable Audio 3 Small Music Base. Higher guidance follows the written description more strictly; compare the results by listening.
Start using Stable Audio 3 Small Music Base Text to Audio in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


