# Stability AI Stable Audio 2.5 Inpaint API

> Stable Audio 2.5 Inpaint by Stability AI regenerates a chosen time range of an existing clip from a text prompt and keeps the rest, producing up to 190 seconds of audio.

Source: https://www.sandbase.ai/models/stability-ai/stable-audio/2.5/inpaint
API reference: https://www.sandbase.ai/models/stability-ai/stable-audio/2.5/inpaint#api

## Facts

- Provider: Stability AI
- Type: Audio model
- Model ID: `stability-ai/stable-audio/2.5/inpaint`
- Price: $0.20 per run
- Capabilities: audio to audio
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "stability-ai/stable-audio/2.5/inpaint",
  "audio": "https://static.sandbase.ai/examples/stability-ai/stable-audio/2.5/inpaint/input_audio_0.mp3",
  "prompt": "Lofi hip hop beat, chillhop",
  "duration": 190,
  "mask_end": 40,
  "mask_start": 15
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Stability AI Stable Audio 2.5 Inpaint through SandBase?

Create a SandBase API key, then send requests with the model ID "stability-ai/stable-audio/2.5/inpaint" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Stability AI account?

No. One SandBase API key and balance gives you access to Stability AI Stable Audio 2.5 Inpaint and the other models in the catalog; you do not need to sign up with Stability AI separately.

## README

### Stable Audio 2.5 Inpaint

Regenerates one time range of a source clip from a prompt and keeps the rest, up to 190 seconds of output.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Text description of what the masked region should become. |
| `audio` | audio file or URL, required | — | Source audio file or URL. Only the masked region is regenerated. |
| `mask_start` | integer 0–190 | 30 | Start of the region to regenerate, in seconds. |
| `mask_end` | integer 0–190 | 190 | End of the region to regenerate; must be after `mask_start`. |
| `duration` | integer 1–190 | 190 | Length of the generated audio in seconds (1–190). |
| `seed` | integer | random | Fix it to compare prompt changes. |

#### Billing

$0.20 per generation, regardless of duration or settings.

| Request | Price |
|---|---|
| One track | $0.20 |
| 10 tracks | $2.00 |

Failed runs are not charged.

#### Prompting

- Describe only what the masked region should contain; keep `duration` equal to the source length to avoid padding.

#### Also on SandBase

Related: `stability-ai/stable-audio/2.5/audio-to-audio`, `stability-ai/stable-audio/2.5/text-to-audio`, `stability-ai/stable-audio/3/medium/audio-inpainting`.
