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

Claude Code · Audio

How to Use Stable Audio 3 Medium Audio Inpainting in Claude Code

Stable Audio 3 Medium Audio Inpainting replaces a selected passage or continues an existing recording using the surrounding sound as context. It lets you revise part of a track while preserving the audio outside the selection.

Prompts to try with Stable Audio 3 Medium Audio Inpainting in Claude Code

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

Use Stable Audio 3 Medium Audio Inpainting on assets/audio/menu.wav. Replace seconds 12 through 24 with quiet ambient piano and sustained strings, matching the surrounding mood. Keep the total length unchanged and save a separate review copy.

Stable Audio 3 Medium Audio InpaintingClaude Code
Try asking
  • Use Stable Audio 3 Medium Audio Inpainting to continue assets/audio/intro.wav from 20 seconds to 45 seconds total. Request restrained electronic music with soft synth chords and a steady pulse. Save the result beside the original.

  • Use Stable Audio 3 Medium Audio Inpainting on assets/audio/exploration.wav. Rework seconds 30 through 50 as sparse instrumental music with muted percussion and warm bass. Preserve everything outside that passage.

  • Use Stable Audio 3 Medium Audio Inpainting to make three alternate endings for assets/audio/outro.wav, replacing seconds 20 through 35. Request a gentle acoustic resolution each time, use eight sampling steps, and save each take separately.

  • Use Stable Audio 3 Medium Audio Inpainting on assets/audio/demo-bed.wav. Replace seconds 10 through 25 with restrained jazz, brushed drums, and softly played upright bass. Keep the seed fixed while comparing two descriptions of the piano part.

How to set up Stable Audio 3 Medium Audio Inpainting in Claude Code

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

Use Spiral's MCP server

  1. Add the hosted server

    This adds Spiral to the current project. Add --scope user to use it in every project.

    claude mcp add --transport http spiral https://api.spiral.ai/mcp
  2. Sign in

    Start claude, type /mcp, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.

Use the Spiral skill

  1. Send Claude Code 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 Inpainting

    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-inpainting",
        "input": {
          "prompt": "punchy kick drum fill",
          "audio_url": "https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav",
          "mask_start_seconds": 4,
          "mask_end_seconds": 8
        }
      }'

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

Stable Audio 3 Medium Audio Inpainting providers and prices

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

falAudio
Stable Audio 3 Medium Audio Inpainting · Audio Inpainting Medium
fal-ai/stable-audio-3/medium/audio-inpainting

Settings you can ask for

Stable Audio 3 Medium Audio Inpainting works from your prompt and audio URL. Ask Claude Code 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.

Mask start seconds0 to 380

Start of the region to regenerate, in seconds.

Mask end seconds0 to 380

End of the region to regenerate, in seconds.

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

What can you do with Stable Audio 3 Medium Audio Inpainting in Claude Code?

Revise a project's instrumental audio without rebuilding the entire cue. A coding agent can work from project recordings, prepare targeted replacements, and keep the results ready for review.

Replace a transition

Regenerate the passage between two sections of an instrumental track, describing the rhythm and energy you want at the handoff.

Simplify music beneath narration

Rework a busy passage in an instrumental background track into a sparse arrangement before mixing it under a voiceover.

Extend a podcast music bed

Continue an existing instrumental cue to fit a longer introduction, keeping the finished recording within 6 minutes 20 seconds.

Try another ending

Replace the closing passage of a music cue with a quieter resolution while keeping its opening and middle.

Revise game music

Create an alternate passage in an existing game soundtrack cue, such as a restrained exploration section with fewer percussion accents.

Compare arrangement ideas

Generate several takes of the same selected passage, changing the instrument emphasis or mood while retaining the surrounding track.

Questions about Stable Audio 3 Medium Audio Inpainting in Claude Code

Can Claude Code use Stable Audio 3 Medium Audio Inpainting?

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

How much does Stable Audio 3 Medium Audio Inpainting cost in Claude Code?

$0.05746 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 Claude Code plan is separate.

Do I need a fal account to use Stable Audio 3 Medium Audio Inpainting in Claude Code?

No. Spiral runs Stable Audio 3 Medium Audio Inpainting 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 Inpainting in Claude Code?

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

Does Claude Code wait while Stable Audio 3 Medium Audio Inpainting runs?

Stable Audio 3 Medium Audio Inpainting runs in the background. Claude Code starts the run, checks on it and gives you the audio when it's ready.

What does audio inpainting change?

It regenerates the selected passage using the surrounding recording as context. Audio outside the selection stays intact.

Can Stable Audio 3 Medium extend a recording?

Yes. Continuation generates material after the existing recording, with a total supported length of up to 6 minutes 20 seconds.

Can it generate narration or spoken dialogue?

Stable Audio 3 is not designed for speech or voice generation. Use it for instrumental audio editing rather than a passage that needs understandable words.

What should I include in an editing prompt?

Describe the music you want to hear: genre, instruments, rhythm, mood, arrangement, and recording character. For example, ask for a restrained jazz passage with brushed drums and a softly played upright bass.

Should I write prompts in English?

Yes. Stable Audio 3 was trained on English descriptions, and Stability says other languages underperform.

Get started

Start using Stable Audio 3 Medium Audio Inpainting in Claude Code

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

Paste this into Claude Code:

Set up Claude Code

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