Stability Ai Stable Audio 3 Audio Inpainting
Playground
Try it on WavespeedAI!Stable Audio 3 Audio Inpainting is a fast AI audio editing model that regenerates a selected region of an audio clip from a prompt while preserving the surrounding audio. Ready-to-use REST inference API for audio repair, sound effect editing, segment regeneration, music production, game audio, video sound design, and professional audio inpainting workflows with simple integration, no coldstarts, and affordable pricing.
Features
Stability AI Stable Audio 3 Audio-Inpainting
Stability AI Stable Audio 3 Audio-Inpainting replaces a selected region inside an existing audio clip using a natural-language prompt. It is designed for localized audio editing workflows where you want to rewrite only part of a clip while preserving the rest of the original audio.
Why Choose This?
-
Region-based audio replacement
Replace only the selected section of an audio clip instead of regenerating the whole file. -
Prompt-guided inpainting
Use a text prompt to describe what the new audio inside the masked region should sound like. -
Negative prompt support
Addnegative_promptto reduce unwanted sounds or qualities in the generated result. -
Preserves surrounding audio
Audio outside the selected inpaint range remains unchanged. -
Flexible output formats
Export results inmp3,wav,flac,ogg,opus,m4a, oraac. -
Production-ready API
Suitable for sound repair, replacement, transition cleanup, ambient editing, and creative post-production workflows.
Parameters
| Parameter | Required | Description |
|---|---|---|
| audio | Yes | Source audio to edit. |
| prompt | Yes | Text prompt describing the replacement audio for the masked region. |
| mask_start_seconds | No | Start time of the region to inpaint, in seconds. Default: 0. |
| mask_end_seconds | No | End time of the region to inpaint, in seconds. Must be greater than mask_start_seconds. Default: 5. |
| negative_prompt | No | Optional terms to avoid in the generated audio. |
| num_inference_steps | No | Number of inference steps. Range: 1–100. Default: 8. |
| guidance_scale | No | Prompt guidance strength. Range: 0–25. Default: 1. |
| output_format | No | Output audio format. Supported values: mp3, wav, flac, ogg, opus, m4a, aac. Default: mp3. |
How to Use
- Upload your source audio — provide the clip you want to edit.
- Write your prompt — describe what the replacement audio inside the selected region should sound like.
- Set the inpaint range — choose
mask_start_secondsandmask_end_secondsto define the region to replace. - Add a negative prompt (optional) — list sounds or qualities you want to avoid.
- Adjust generation controls (optional) — tune
num_inference_stepsandguidance_scaleif needed. - Choose output format — select the format that best fits your workflow.
- Submit — run the model and download the edited audio.
Example Prompt
Replace this section with a softer cinematic ambience, distant wind, subtle metallic resonance, and a smoother transition into the following audio.
Pricing
Just $0.0442 per request.
Billing Rules
- Each inpainting request costs $0.0442
- Pricing is fixed per request
mask_start_seconds,mask_end_seconds,negative_prompt,num_inference_steps,guidance_scale, andoutput_formatdo not affect pricing
Best Use Cases
- Audio repair — Replace damaged or unwanted segments inside an existing clip.
- Transition cleanup — Smooth over awkward cuts or rough edits in a timeline.
- Sound redesign — Change one localized part of a scene without affecting the rest.
- Creative post-production — Rewrite small sections of a soundtrack or ambience bed.
- Effect replacement — Swap out a specific sound event while keeping surrounding context intact.
Pro Tips
- Keep the masked region as tight as possible for more controlled replacement.
- Use prompts that match the tone and texture of the surrounding audio for smoother blending.
- Add a
negative_promptwhen you want to avoid music, vocals, distortion, or unwanted effects. - Increase
num_inference_stepsif you want potentially more refined results and can tolerate more runtime. - Choose
wavorflacwhen you plan further editing after generation.
Notes
audioandpromptare required.mask_start_secondsandmask_end_secondsdefine the exact region to replace.mask_end_secondsmust be greater thanmask_start_seconds.- Audio outside the selected mask range is preserved.
- Pricing is fixed at $0.0442 per request.
Related Models
- Stability AI Stable Audio 3 Text-to-Audio — Generate audio directly from a text prompt.
- Stability AI Stable Audio 3 Audio-Outpainting — Extend an existing audio clip before and/or after the source.
- Other audio editing workflows — Useful when you need continuation, regeneration, or more specialized sound design controls.
<ApiPage model={model}>
## Authentication
For authentication details, please refer to the [Authentication Guide](/docs-authentication).
## API Endpoints
### Submit Task & Query Result
## Parameters
### Task Submission Parameters
#### Request Parameters
#### Response Parameters
<SubmitResponse />
#### Result Request Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| id | string | Yes | - | Task ID |
#### Result Response Parameters
| Parameter | Type | Description |
|-----------|------|-------------|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., "success") |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of generated audio URLs. |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: `created`, `processing`, `completed`, or `failed` |
| data.created_at | string | ISO timestamp of when the request was created (e.g., "2023-04-01T12:34:56.789Z") |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
</ApiPage>