[Integrations](https://spiral.ai/integrations) › [Grok](https://spiral.ai/integrations/grok) › [Stable Audio 3 Medium Audio Inpainting](https://spiral.ai/integrations/grok/stable-audio-3-medium-audio-inpainting)

# How to Use Stable Audio 3 Medium Audio Inpainting in Grok

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.

|  |  |
| --- | --- |
| Model | Stable Audio 3 Medium Audio Inpainting |
| Available through | fal |
| Category | Audio |
| Price | $0.05746 per run at the default inputs. |
| Returns | audio |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Stable Audio 3 Medium Audio Inpainting in Grok

- Use Stable Audio 3 Medium Audio Inpainting on the attached instrumental recording. Replace seconds 15 through 30 with soft piano and brushed drums, keeping the same calm mood and total length.
- Use Stable Audio 3 Medium Audio Inpainting to extend the attached 20-second music cue to 40 seconds total. Continue its warm acoustic feel with delicate guitar and restrained percussion.
- Use Stable Audio 3 Medium Audio Inpainting on the attached track. Rework seconds 30 through 45 as a quieter passage with sustained strings and fewer rhythmic accents. Keep the rest of the recording.
- Use Stable Audio 3 Medium Audio Inpainting to replace the final 10 seconds of this 40-second instrumental cue. Request a gentle piano resolution with a small-room recording sound.
- Use Stable Audio 3 Medium Audio Inpainting to give me two takes of seconds 10 through 25 in the attached track. Ask for mellow jazz guitar in one and soft electric piano in the other, matching the surrounding rhythm.

## How to set up Stable Audio 3 Medium Audio Inpainting in Grok

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

### Use the Grok connector

1. **Add a custom connector**: In Grok open Settings › Connect Apps, then Add a custom connector. Name it Spiral, paste this URL, leave Headers empty and click Add MCP.

```text
https://api.spiral.ai/mcp
```

2. **Sign in to Spiral and approve**: Grok opens Spiral: sign in, pick the organization and click Authorize. Spiral gives the connection its own API key; Grok never sees it, and you can remove the connection under Settings › Connected apps.

3. **Check that it is connected**: Connect Apps › Custom shows Spiral as Connected. It works in every Grok chat and Grok bot.

### Use the Spiral skill

1. **Send Grok 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.

```bash
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.

```bash
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: Grok finds Stable Audio 3 Medium Audio Inpainting on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/grok

## Stable Audio 3 Medium Audio Inpainting tools and prices

- [Stable Audio 3 Medium Audio Inpainting · Audio Inpainting Medium](https://spiral.ai/tools/fal/fal-ai/stable-audio-3/medium/audio-inpainting) (fal): $0.05746 per run at the default inputs.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| negative_prompt |  |  | Text description of qualities to avoid in the output. |
| num_inference_steps | 1 to 100 | 8 | Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. |
| guidance_scale | 0 to 25 | 1 | Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. |
| seed |  | — | Random seed for reproducible outputs. Omit for a random seed. |
| enable_prompt_expansion |  | false | 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, aac | mp3 | Container format for the generated audio output. |

## What can you do with Stable Audio 3 Medium Audio Inpainting in Grok?

Keep the parts of an instrumental recording you like and ask for a new take on one passage. A chat assistant can turn a description of the desired mood and instrumentation into a focused editing request.

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

## Overview

- [fal](https://spiral.ai/providers/fal)
- [All Grok guides](https://spiral.ai/integrations/grok)

## Stable Audio 3 Medium Audio Inpainting in other agents

- [Amp](https://spiral.ai/integrations/amp/stable-audio-3-medium-audio-inpainting)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/stable-audio-3-medium-audio-inpainting)
- [Claude](https://spiral.ai/integrations/claude-desktop/stable-audio-3-medium-audio-inpainting)
- [Claude Code](https://spiral.ai/integrations/claude-code/stable-audio-3-medium-audio-inpainting)
- [Cline](https://spiral.ai/integrations/cline/stable-audio-3-medium-audio-inpainting)
- [Codex](https://spiral.ai/integrations/codex/stable-audio-3-medium-audio-inpainting)
- [Cursor](https://spiral.ai/integrations/cursor/stable-audio-3-medium-audio-inpainting)
- [Devin](https://spiral.ai/integrations/devin/stable-audio-3-medium-audio-inpainting)
- [dots](https://spiral.ai/integrations/dots/stable-audio-3-medium-audio-inpainting)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/stable-audio-3-medium-audio-inpainting)
- [Gemini](https://spiral.ai/integrations/gemini/stable-audio-3-medium-audio-inpainting)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/stable-audio-3-medium-audio-inpainting)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/stable-audio-3-medium-audio-inpainting)
- [goose](https://spiral.ai/integrations/goose/stable-audio-3-medium-audio-inpainting)
- [Grok Build](https://spiral.ai/integrations/grok-build/stable-audio-3-medium-audio-inpainting)
- [Hermes](https://spiral.ai/integrations/hermes/stable-audio-3-medium-audio-inpainting)
- [Instinct](https://spiral.ai/integrations/instinct/stable-audio-3-medium-audio-inpainting)
- [Manus](https://spiral.ai/integrations/manus/stable-audio-3-medium-audio-inpainting)
- [Muse](https://spiral.ai/integrations/muse/stable-audio-3-medium-audio-inpainting)
- [Muse Code](https://spiral.ai/integrations/muse-code/stable-audio-3-medium-audio-inpainting)
- [n8n](https://spiral.ai/integrations/n8n/stable-audio-3-medium-audio-inpainting)
- [Notion](https://spiral.ai/integrations/notion/stable-audio-3-medium-audio-inpainting)
- [OpenClaw](https://spiral.ai/integrations/openclaw/stable-audio-3-medium-audio-inpainting)
- [opencode](https://spiral.ai/integrations/opencode/stable-audio-3-medium-audio-inpainting)
- [Perplexity](https://spiral.ai/integrations/perplexity/stable-audio-3-medium-audio-inpainting)
- [Raycast](https://spiral.ai/integrations/raycast/stable-audio-3-medium-audio-inpainting)
- [VS Code](https://spiral.ai/integrations/vscode/stable-audio-3-medium-audio-inpainting)
- [Windsurf](https://spiral.ai/integrations/windsurf/stable-audio-3-medium-audio-inpainting)
- [Zapier](https://spiral.ai/integrations/zapier/stable-audio-3-medium-audio-inpainting)

## More Grok guides

- [Stable Audio 2.5 Text to Audio](https://spiral.ai/integrations/grok/stable-audio-2-5-text-to-audio)
- [Stable Audio 3 Medium Audio Outpainting](https://spiral.ai/integrations/grok/stable-audio-3-medium-audio-outpainting)
- [Stable Audio 2.5 Inpaint](https://spiral.ai/integrations/grok/stable-audio-2-5-inpaint)
- [Stable Audio 3 Medium Audio to Audio](https://spiral.ai/integrations/grok/stable-audio-3-medium-audio-to-audio)
- [Stable Audio 2.5 Audio to Audio](https://spiral.ai/integrations/grok/stable-audio-2-5-audio-to-audio)
- [Stable Audio 3 Medium Base Audio Inpainting](https://spiral.ai/integrations/grok/stable-audio-3-medium-base-audio-inpainting)

## Questions about Stable Audio 3 Medium Audio Inpainting in Grok

**Can Grok use Stable Audio 3 Medium Audio Inpainting?**

Yes. Add Spiral to Grok as an MCP server, and Grok 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 Grok?**

$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 Grok plan is separate.

**Do I need a fal account to use Stable Audio 3 Medium Audio Inpainting in Grok?**

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 Grok?**

About two minutes: add a custom connector, then sign in to Spiral and approve, then check that it is connected.

**Does Grok wait while Stable Audio 3 Medium Audio Inpainting runs?**

Stable Audio 3 Medium Audio Inpainting runs in the background. Grok 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.

