# Stable Audio 3 Medium Inpainting - API, Playground & Pricing

> Run Stable Audio 3 Medium Inpainting by Stability AI via API, Playground, or MCP from $0.0442 per run - no provider API key needed. Replace a section of your track: mark the seconds, say what should play there, keep the rest.

Page: https://flymy.ai/models/stable-audio-3-medium-audio-inpainting/

Models / Music

Stable Audio 3 Medium Inpainting regenerates the part of your track you mark, from a text prompt, and keeps the rest. Run it in the playground, call its API, or let Claude Code, Codex or Cursor run it through one FlyMy.AI MCP. No Stability AI API key: runs are billed to your FlyMy.AI balance.

[▶ Try in Playground](https://app.flymy.ai/models/flymyai/stable-audio-3-medium-audio-inpainting) [<> Get API](https://flymy.ai/models/stable-audio-3-medium-audio-inpainting/#api)

**Provider**

[Stability AI](https://flymy.ai/models/provider/stability-ai/)

**Category**

[Music](https://flymy.ai/models/music/) / Audio inpainting

**Price**

$0.0442 / run ($0.0442 at the defaults)

**Returns**

`audio`, `seed`

**Commercial use**

Allowed

**Model ID**

`flymyai/stable-audio-3-medium-audio-inpainting`

![Stable Audio 3 Medium Inpainting by Stability AI: audio inpainting sample, redo part of a track](https://flymy.ai/img/models/stable-audio-3-medium-audio-inpainting.jpg)

Stable Audio 3 Medium Inpainting sample from the FlyMy.AI catalog

$ YOUR NEXT RUN

Claude Code, Codex, Cursor, Any agent

## Use Stable Audio 3 Medium Inpainting in your assistant

Paste this prompt into Claude Code, Codex, Cursor or any agent. It reads the guide and helps you connect.

```
Read https://flymy.ai/skill.md and https://flymy.ai/models/stable-audio-3-medium-audio-inpainting.md. Help me connect the FlyMy.AI MCP to this assistant, then run Stable Audio 3 Medium Inpainting (flymyai/stable-audio-3-medium-audio-inpainting) for this task: Replace seconds 20 to 30 of the music track I attach with a calmer piano passage using Stable Audio 3 Medium Inpainting.
```

[Open FlyMy.AI](https://app.flymy.ai/new-agent) [Download brief](https://flymy.ai/models/stable-audio-3-medium-audio-inpainting.md)

## What Stable Audio 3 Medium Inpainting does

Send audio, your track as a link or an upload, and mark the part to regenerate with mask_start_seconds and mask_end_seconds, both required, in seconds from the start of the track (up to 380); the end must come after the start and everything outside the part is kept. Say in prompt what should play there, for example a calmer passage with soft piano, and in negative_prompt what to keep out. seed repeats a result and num_inference_steps (1 to 100, 8 by default) rarely needs changing on this distilled model; output_format is mp3 (the default, 192 kbit/s), wav, flac, ogg, opus, m4a or aac. Outputs: audio, the track with the part regenerated, and seed. It is Stability AI's audio-editing model with 1.4 billion parameters: use it to replace a section, rework a passage or fill a gap.

It is billed at one flat price per run, and it works on one part per request. It does not make a track from text alone (Stable Audio 3 Medium does), change the parts outside the marked one or add audio before or after your track (Stable Audio 3 Medium Outpainting does).

Send only audio you have the right to use.

## Stable Audio 3 Medium Inpainting inputs

Every input of `flymyai/stable-audio-3-medium-audio-inpainting` as its live schema lists them. Returns `audio` (array), `seed` (string).

| Input | Type, values and default |
|---|---|
| [#](https://flymy.ai/models/stable-audio-3-medium-audio-inpainting/#input-prompt) `prompt` | string required What should play in the regenerated part of the track, e.g. a calmer passage with soft piano |
| [#](https://flymy.ai/models/stable-audio-3-medium-audio-inpainting/#input-audio) `audio` | file required Allowed: audio file, as a URL or upload The track to edit (only the marked part is regenerated), a link or an upload; send only audio you have the right to use |
| [#](https://flymy.ai/models/stable-audio-3-medium-audio-inpainting/#input-mask_start_seconds) `mask_start_seconds` | number required Allowed: 0 to 380 Where the part to regenerate starts, in seconds from the start of your audio (0-380); everything outside the part is kept |
| [#](https://flymy.ai/models/stable-audio-3-medium-audio-inpainting/#input-mask_end_seconds) `mask_end_seconds` | number required Allowed: 0 to 380 Where the part to regenerate ends, in seconds from the start of your audio (0-380), after its start |
| [#](https://flymy.ai/models/stable-audio-3-medium-audio-inpainting/#input-negative_prompt) `negative_prompt` | string optional Qualities to keep out of the music, e.g. distortion or noise |
| [#](https://flymy.ai/models/stable-audio-3-medium-audio-inpainting/#input-seed) `seed` | integer optional Allowed: 0 to 2147483647 Seed for a repeatable result |
| [#](https://flymy.ai/models/stable-audio-3-medium-audio-inpainting/#input-num_inference_steps) `num_inference_steps` | integer optional Allowed: 1 to 100 Default: `8` Sampling steps, 1-100 (8 by default): this distilled model gains little from more |
| [#](https://flymy.ai/models/stable-audio-3-medium-audio-inpainting/#input-output_format) `output_format` | string optional Allowed: mp3, wav, flac, ogg, opus, m4a, aac Default: `mp3` File format: mp3 (the default, 192 kbit/s), lossless wav or flac, or ogg, opus, m4a or aac |

## Ask your agent

Requests to paste as they are, once the FlyMy.AI MCP is connected.

**“Replace seconds 20 to 30 of the music track I attach with a calmer piano passage using Stable Audio 3 Medium Inpainting.”** runs `flymyai/stable-audio-3-medium-audio-inpainting`

**“With Stable Audio 3 Medium Inpainting, regenerate the part of my loop from 4 to 8 seconds as a stronger drum fill and keep the rest.”** runs `flymyai/stable-audio-3-medium-audio-inpainting`

**“Fill the gap at 12 to 15 seconds of my track with Stable Audio 3 Medium Inpainting: soft strings, no drums.”** runs `flymyai/stable-audio-3-medium-audio-inpainting`

## Stable Audio 3 Medium Inpainting price

$0.0442 per run. A run at the default settings costs $0.0442. Billed to your FlyMy.AI balance; no seats, no subscription and no minimum.

[Every model's price →](https://flymy.ai/models/pricing/) [Usage pricing →](https://flymy.ai/pricing/)

## Stable Audio 3 Medium Inpainting vs similar models

Popular music models beside it, with prices from billing and settings from each live schema.

| Model | Provider | Kind | Price | Default run | Length |
|---|---|---|---|---|---|
| **Stable Audio 3 Medium Inpainting** | Stability AI | Audio inpainting | $0.0442 / run | $0.0442 |  |
| [Lyria 3.5](https://flymy.ai/models/lyria-3-5-music/) | Google | Music | $0.10 / run | $0.10 |  |
| [MiniMax Music 3](https://flymy.ai/models/minimax-music-3/) | MiniMax | Music | $0.002 / s | $0.12 | 1 to 300 seconds |
| [Stable Audio 3 Medium](https://flymy.ai/models/stable-audio-3-medium-text-to-audio/) | Stability AI | Instrumental music | $0.0376 / run | $0.0376 | 1 to 380 seconds |

## Stable Audio 3 Medium Inpainting API

The same model from your own code or from an agent. Send your FlyMy.AI API key in the `X-API-KEY` header; [get a key](https://app.flymy.ai/developers) in your account.

### cURL

Form fields, not JSON; files go as uploads or public URLs. The answer is a `prediction_id`; read the result at `https://api.flymy.ai/api/v1/flymyai/stable-audio-3-medium-audio-inpainting/predict/async/result/?request_id=<prediction_id>`.

```
curl -X POST https://api.flymy.ai/api/v1/flymyai/stable-audio-3-medium-audio-inpainting/predict/async/ \
  -H "X-API-KEY: $FLYMYAI_API_KEY" \
  -F 'prompt=A calmer passage with soft piano' \
  -F "audio=@voice.mp3" \
  -F 'mask_start_seconds=4' \
  -F 'mask_end_seconds=8'
```

### Python

The FlyMy.AI SDK sends the same fields; a file input also takes a public URL.

```
# pip install flymyai
import os

from flymyai import client

fma = client(apikey=os.environ["FLYMYAI_API_KEY"])
task = fma.predict_async_task(
    model="flymyai/stable-audio-3-medium-audio-inpainting",
    payload={
        "prompt": "A calmer passage with soft piano",
        "audio": "https://example.com/voice.mp3",
        "mask_start_seconds": "4",
        "mask_end_seconds": "8"
    },
)
# a long run: wait for its result (up to 15 minutes here)
result = task.result(timeout=900)
print(result.inference_responses[0].output_data)
```

### JavaScript / TypeScript

The FlyMy.AI SDK sends the same fields; a file input also takes a public URL.

```
// npm install flymyai-js-client
import { FlyMyAI } from "flymyai-js-client";

const client = new FlyMyAI({ apiKey: process.env.FLYMYAI_API_KEY });
const response = await client.predict(
  {
    "prompt": "A calmer passage with soft piano",
    "audio": "https://example.com/voice.mp3",
    "mask_start_seconds": "4",
    "mask_end_seconds": "8"
  },
  "flymyai/stable-audio-3-medium-audio-inpainting",
);
console.log(response.output_data);
```

### MCP

Your agent calls `get_model_schema`, then `run_model` with:

```
{
  "endpoint_id": "flymyai/stable-audio-3-medium-audio-inpainting",
  "input": {
    "prompt": "A calmer passage with soft piano",
    "audio": "https://example.com/voice.mp3",
    "mask_start_seconds": "4",
    "mask_end_seconds": "8"
  }
}
```

## Questions about Stable Audio 3 Medium Inpainting

**Do I need a Stability AI API key for Stable Audio 3 Medium Inpainting?**

No. Stable Audio 3 Medium Inpainting runs on FlyMy.AI's account, so you need no Stability AI key or plan: sign in to FlyMy.AI once and each run is billed to your FlyMy.AI balance.

**How much does Stable Audio 3 Medium Inpainting cost?**

$0.0442 per run. There is no subscription or minimum; the price comes from FlyMy.AI billing and was checked on 2026-11-18.

**Can I try Stable Audio 3 Medium Inpainting before I write code?**

Yes. Open Stable Audio 3 Medium Inpainting in the FlyMy.AI playground at https://app.flymy.ai/models/flymyai/stable-audio-3-medium-audio-inpainting, fill in its inputs and run it; the same run is one API call later, billed the same way.

**How do I use Stable Audio 3 Medium Inpainting in Claude Code, Codex or Cursor?**

Add the FlyMy.AI MCP with one command and sign in, then ask in plain words, for example: "Replace seconds 20 to 30 of the music track I attach with a calmer piano passage using Stable Audio 3 Medium Inpainting." Your agent reads the inputs with get_model_schema and runs flymyai/stable-audio-3-medium-audio-inpainting with run_model.

**What does Stable Audio 3 Medium Inpainting need as input?**

Stable Audio 3 Medium Inpainting requires prompt, audio, mask_start_seconds and mask_end_seconds; it also takes 4 optional inputs, each listed on this page with its allowed values and default.

**Can I call Stable Audio 3 Medium Inpainting from my own code?**

Yes. Send form fields to https://api.flymy.ai/api/v1/flymyai/stable-audio-3-medium-audio-inpainting/predict/async/ with your FlyMy.AI API key in the X-API-KEY header.

## More voice, music and sound models

Read text aloud, clone a voice from a short sample, turn lyrics or a prompt into a song, compose instrumentals, make sound effects from a description or for a video, or repair and extend a track.

### Stable Audio 3 Medium

Stability AI's music model for backing tracks, loops and intros: stereo, up to 6 minutes, one flat price.

Instrumental music / $0.0376 / run

Link: https://flymy.ai/models/stable-audio-3-medium-text-to-audio/

### Stable Audio 3 Medium Outpainting

Lengthen a track or add an intro or an ending: new audio before the start or after the end.

Audio extension / $0.0446 / run

Link: https://flymy.ai/models/stable-audio-3-medium-audio-outpainting/

### Stable Audio 3 Small Music

The lightweight Stable Audio 3: cheap background music and loops of up to 2 minutes.

Instrumental music / $0.0217 / run

Link: https://flymy.ai/models/stable-audio-3-small-music-text-to-audio/

### Stable Audio 3 Small Music Inpainting

Lightweight music editing: regenerate one marked passage of a track of up to 2 minutes.

Audio inpainting / $0.026 / run

Link: https://flymy.ai/models/stable-audio-3-small-music-audio-inpainting/

### Stable Audio 3 Small Music Outpainting

Lightweight track extension: add up to 120 seconds of new music before or after your own.

Audio extension / $0.0265 / run

Link: https://flymy.ai/models/stable-audio-3-small-music-audio-outpainting/

### Stable Audio 3 Small SFX

Impacts, footsteps, weather and ambience beds from a sentence, up to 2 minutes, at one flat price.

Sound effects / $0.0206 / run

Link: https://flymy.ai/models/stable-audio-3-small-sfx-text-to-audio/

## Go to the source

[Stable Audio 3 Medium Inpainting in the playground →](https://app.flymy.ai/models/flymyai/stable-audio-3-medium-audio-inpainting), [Music models →](https://flymy.ai/models/music/), [Stability AI models →](https://flymy.ai/models/provider/stability-ai/), [Model endpoints in the docs →](https://docs.flymy.ai/api/models-endpoints), [Every model on FlyMy.AI →](https://flymy.ai/models/), [Model prices →](https://flymy.ai/models/pricing/), [Every MCP in the catalog →](https://flymy.ai/mcp/#catalog)

From the FlyMy.AI model catalog of 2026-11-18: inputs from each model's live schema, prices from FlyMy.AI billing. Requests are examples to paste, not recorded runs.

---

For agents: the FlyMyAI operating guide (sign up, connect, run models, tools and agents) is https://flymy.ai/skill.md, and https://flymy.ai/llms.txt lists the other pages and the documentation.
