[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [Stable Audio 2.5 Inpaint](https://spiral.ai/integrations/codex/stable-audio-2-5-inpaint)

# How to Use Stable Audio 2.5 Inpaint in Codex

Stable Audio 2.5 Inpaint regenerates a selected passage or continues a recording using its existing context. Unlike Stable Audio 2.5 Audio to Audio, it lets you keep an original section while generating a different continuation.

|  |  |
| --- | --- |
| Model | Stable Audio 2.5 Inpaint |
| Available through | fal |
| Category | Audio |
| Price | $0.26 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 2.5 Inpaint in Codex

- Use Stable Audio 2.5 Inpaint on the project's 60-second trailer cue. Regenerate seconds 40 through 60 with cinematic strings, low brass, and a restrained ending, using the opening as context.
- Compose a 30-second upbeat lo-fi track with Stable Audio 2.5 Inpaint for a product video. Save the result in ./assets.
- Make a calm piano loop with Stable Audio 2.5 Inpaint for a meditation app.
- Create a cinematic 20-second intro sting with Stable Audio 2.5 Inpaint.
- Make three 15-second jingle options with Stable Audio 2.5 Inpaint for a podcast ad break.

## How to set up Stable Audio 2.5 Inpaint in Codex

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

### Use Spiral's MCP server

1. **Add the hosted server**

```bash
codex mcp add spiral --url https://api.spiral.ai/mcp
```

2. **Sign in**: Codex opens the browser: sign in to Spiral and click Authorize. No API key. `codex mcp list` then shows Spiral.

```bash
codex mcp login spiral
```

### Use the Spiral skill

1. **Send Codex 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 2.5 Inpaint**: 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-25/inpaint",
    "input": {
      "prompt": "Lofi hip hop beat, chillhop",
      "audio_url": "https://v3.fal.media/files/elephant/t0ZrzW_ueetXrr3NUa87F_a2a_in.mp3"
    }
  }'
```

Then paste one of the prompts above: Codex finds Stable Audio 2.5 Inpaint on Spiral, shows the price and runs it.

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

## Stable Audio 2.5 Inpaint tools and prices

- [Stable Audio 25 · Inpaint](https://spiral.ai/tools/fal/fal-ai/stable-audio-25/inpaint) (fal): $0.26 per run at the default inputs.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seconds_total | 1 to 190 | 190 | The duration of the audio clip to generate. If not provided, it will be set to the duration of the input audio. |
| guidance_scale | 1 to 25 | 1 | How strictly the diffusion process adheres to the prompt text (higher values make your audio closer to your prompt). |
| mask_start | 0 to 190 | 30 | The start point of the audio mask |
| mask_end | 0 to 190 | 190 | The end point of the audio mask |
| num_inference_steps | 4 to 8 | 8 | The number of steps to denoise the audio for |
| seed |  | — |  |

## What can you do with Stable Audio 2.5 Inpaint in Codex?

Turn a project's creative brief into soundtrack drafts, alternate treatments, or revised passages with Stable Audio 2.5. A coding agent can use scene descriptions and existing audio assets to prepare concrete musical directions for review.

### Music for short ads

Draft a cue from a brief, restyle an existing recording, or regenerate a passage for a different edit. Describe the instruments and mood that should support the product.

### Game menu music

Develop a restrained instrumental cue for a title screen. Start from a written direction, reinterpret a demo, or revise a section of an existing cue.

### Boss battle scoring

Explore percussion, bass, and orchestral or electronic instrumentation for a combat cue. Generate a first take, restyle a recording, or replace a passage that needs a different energy level.

### Short video soundtracks

Create a musical direction for a travel film, product demonstration, or opening sequence. Use text for a first draft, source audio for reinterpretation, or inpainting for a revised continuation.

### Podcast intro and outro cues

Develop brief instrumental openings and endings with a clear mood and instrument palette. Draft from text, restyle a recorded theme, or regenerate its closing passage.

### Revise a soundtrack ending

Keep the opening of an existing cue and regenerate its closing section. Supply the replacement interval and describe an ending that fits the preceding music.

## Overview

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

## Stable Audio 2.5 Inpaint in other agents

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

## More Codex guides

- [Stable Audio 2.5 Audio to Audio](https://spiral.ai/integrations/codex/stable-audio-2-5-audio-to-audio)
- [Stable Audio 2.5 Text to Audio](https://spiral.ai/integrations/codex/stable-audio-2-5-text-to-audio)
- [Sonilo v1.1 Video to Sound Effects](https://spiral.ai/integrations/codex/sonilo-v1-1-video-to-sound-effects)
- [Stable Audio 3 Medium Audio Inpainting](https://spiral.ai/integrations/codex/stable-audio-3-medium-audio-inpainting)
- [Sonilo v1.1 Video to Music](https://spiral.ai/integrations/codex/sonilo-v1-1-video-to-music)
- [Stable Audio 3 Medium Audio Outpainting](https://spiral.ai/integrations/codex/stable-audio-3-medium-audio-outpainting)

## Questions about Stable Audio 2.5 Inpaint in Codex

**Can Codex use Stable Audio 2.5 Inpaint?**

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Stable Audio 2.5 Inpaint like any built-in tool.

**How much does Stable Audio 2.5 Inpaint cost in Codex?**

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

**Do I need a fal account to use Stable Audio 2.5 Inpaint in Codex?**

No. Spiral runs Stable Audio 2.5 Inpaint 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 2.5 Inpaint in Codex?**

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

**Does Codex wait while Stable Audio 2.5 Inpaint runs?**

Stable Audio 2.5 Inpaint runs in the background. Codex starts the run, checks on it and gives you the audio when it's ready.

**How long can Stable Audio 2.5 audio be?**

A single output can run up to 190 seconds, or 3 minutes 10 seconds. Plan longer productions as separate cues.

**What audio quality does Stable Audio 2.5 produce?**

Stable Audio 2.5 produces 44.1 kHz stereo audio. That describes the sample rate and channels; listen to each result before choosing a production take.

**What should I include in a Stable Audio 2.5 prompt?**

Describe the genre, instruments, mood, and tempo, then add texture such as soft percussion or a dry guitar recording. Give it a concrete musical target instead of a broad request like background music.

**Can Stable Audio 2.5 make music that develops over time?**

Yes. Stability describes improved support for compositions with an introduction, development, and outro, so it is useful for cues that need an arc rather than one repeating section.

**Why does my Stable Audio 2.5 result miss the sound I wanted?**

Make the acoustic description more specific: name the instruments, musical style, mood, and texture. Treat each result as a draft and refine the description around what you hear.

