Spiral gives your agent every tool with one account. Browse the tools →

opencode · Audio

How to Use Stable Audio 3 Medium Audio Outpainting in opencode

Stable Audio 3 Medium Audio Outpainting extends an existing recording for longer music beds, instrumental passages, and soundscapes. It generates audio around the source, making it useful when you already have the sound you want and need more of it.

Prompts to try with Stable Audio 3 Medium Audio Outpainting in opencode

Copy an example into opencode, or ask in your own words.

Use Stable Audio 3 Medium Audio Outpainting to extend assets/audio/menu-theme.wav by 20 seconds after its 40-second source. Continue the mellow electric piano, soft bass, and restrained drums for the menu screen.

Stable Audio 3 Medium Audio Outpaintingopencode
Try asking
  • Use Stable Audio 3 Medium Audio Outpainting to add a 10-second introduction before assets/audio/title-cue.wav, which is 30 seconds long. Begin with sparse synth notes and build toward the existing electronic arrangement.

  • Use Stable Audio 3 Medium Audio Outpainting to extend the 25-second forest recording in assets/audio/forest.wav by 30 seconds. Continue the same distant birds, leaf movement, and quiet outdoor atmosphere.

  • Use Stable Audio 3 Medium Audio Outpainting to add a 15-second ending to assets/audio/demo-score.wav, a 60-second instrumental. Keep its acoustic guitar and soft percussion, then request a gentle final chord.

  • Use Stable Audio 3 Medium Audio Outpainting to extend assets/audio/engine-drone.wav from 12 seconds to 20 seconds. Continue the low mechanical hum and metallic resonance for the spacecraft scene, then save the result for auditioning.

How to set up Stable Audio 3 Medium Audio Outpainting in opencode

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. 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
  2. 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
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. 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

  1. Create an API key

    In the console, under API keys.

  2. Run Stable Audio 3 Medium Audio Outpainting

    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/medium/audio-outpainting",
        "input": {
          "prompt": "soft strings continue the melody",
          "audio_url": "https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav"
        }
      }'

Then paste one of the prompts above: opencode finds Stable Audio 3 Medium Audio Outpainting on Spiral, shows the price and runs it.

Stable Audio 3 Medium Audio Outpainting providers and prices

Spiral runs Stable Audio 3 Medium Audio Outpainting through fal. Open a card for today's price, with every fee included.

falAudio
Stable Audio 3 Medium Audio Outpainting · Audio Outpainting Medium
fal-ai/stable-audio-3/medium/audio-outpainting

Settings you can ask for

Stable Audio 3 Medium Audio Outpainting works from your prompt and audio URL. Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Negative promptwhat to leave out, in words

Text description of qualities to avoid in the output.

Number of inference steps1 to 1008

Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher.

Guidance scale0 to 251

Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints.

Seeda whole number

Random seed for reproducible outputs. Omit for a random seed.

Enable prompt expansionon or offoff

If True, the prompt will be expanded using an LLM for more detailed and higher quality results.

Output formatmp3, wav, flac, ogg, opus, m4a, or aacmp3

Container format for the generated audio output.

Extend seconds before0 to 3800

Seconds of new audio to generate before the source audio.

Extend seconds after0 to 3800

Seconds of new audio to generate after the source audio.

Every API field of Stable Audio 3 Medium Audio Outpainting · Audio Outpainting Medium is on its tool page: open its card above.

What can you do with Stable Audio 3 Medium Audio Outpainting in opencode?

Extend existing game audio, demo soundtracks, and interface sound beds from your project's recordings. A coding agent can pair each continuation with the scene or timing requirement already documented in the project.

Longer podcast music beds

Extend an existing instrumental bed to cover a longer introduction or closing segment. Request the same restrained arrangement so the music leaves room for speech.

Music for a revised video edit

Continue an existing soundtrack cue when a scene runs longer. Describe the instruments and mood already present, then ask for the extra passage the edit needs.

Introductions for instrumental cues

Generate a lead-in before an existing recording. Ask for a sparse opening that approaches the source's instrumentation and energy.

Alternative musical endings

Add a new ending to an instrumental sketch. Try a quiet piano resolution, a thinning percussion passage, or a sustained ambient finish.

Longer game atmospheres

Extend an existing forest, cavern, or machinery recording for a longer scene. Keep the requested sound sources consistent with the original atmosphere.

More material from an instrumental sketch

Continue a short guitar, piano, or percussion recording to explore where the passage could go next. Treat each continuation as material to audition and edit.

Extended sound effect tails

Continue an existing drone, mechanical hum, or resonant effect when its tail ends too soon. Describe the decay and recording space you want to hear.

Questions about Stable Audio 3 Medium Audio Outpainting in opencode

Can opencode use Stable Audio 3 Medium Audio Outpainting?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Stable Audio 3 Medium Audio Outpainting like any built-in tool.

How much does Stable Audio 3 Medium Audio Outpainting cost in opencode?

$0.05798 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 Medium Audio Outpainting in opencode?

No. Spiral runs Stable Audio 3 Medium Audio Outpainting 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 Medium Audio Outpainting in opencode?

About two minutes: add the server, then sign in, then check it.

Does opencode wait while Stable Audio 3 Medium Audio Outpainting runs?

Stable Audio 3 Medium Audio Outpainting 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 Medium Audio Outpainting good for?

Use it to lengthen an existing instrumental cue, continue a musical passage, or extend an ambient recording. The source gives the continuation its starting context.

Can it add an introduction as well as an ending?

Yes. It can generate new audio before the recording, after it, or on both sides.

How long can Stable Audio 3 Medium generate?

Stability AI lists a maximum generation length of 380 seconds, or 6 minutes and 20 seconds. For continuation work, plan short additions and review each join before extending further.

Can it continue a song with understandable lyrics?

Stable Audio 3 does not generate intelligible vocals. It can produce vocal-like textures, so use it for instrumental material rather than a sung verse with exact words.

Why does the continuation sound more like the recording than my prompt?

Stability AI says the audio context matters more than the prompt. Describe a continuation that fits the source, then request a modest change in instrumentation or energy.

Get started

Start using Stable Audio 3 Medium Audio Outpainting in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options