Notice: Black Friday 2026 × Cyber Monday: Get up to 30% extra on top-ups, DeepSeek free to use · View the promotion
21:9 high-key light rendering: on the right, a glass sound-wave ribbon and a metal tuning fork metaphor for stable-audio-3-medium, with the name etched and glowing; on the left, reserved empty space with a creamy halo, in ice blue and cyan blue paired with coral and light purple.

Stability AI

Stable Audio 3 Medium

stable-audio-3-medium/audio-inpainting

Stable Audio 3 Medium is an audio generation model from Stability AI, offering three tasks on HiAPI: generating audio from scratch based on a text description, with a default of 30 seconds and a maximum of 380 seconds; redoing a specified time segment within existing audio; and extending new content at the beginning or end of audio. Output supports 7 formats including MP3, WAV, and FLAC, and supports fixed random seeds for reproducing results, making it suitable for scenarios such as short video soundtracks, game and ambient audio, podcast packaging, and sound effect drafts.

Try stable-audio-3-medium/audio-inpainting

Input

Output

Fill in the parameters and run — results show up here.

Pricing

stable-audio-3-medium/audio-inpainting $0.0632 per audio

Positioning Overview

Stable Audio 3 Medium's local inpainting capability regenerates a specified time range within existing audio. Submit the source audio, start and end seconds, and a description; the model rewrites only the masked interval while keeping the rest unchanged, returning one complete new audio file. It is suited to fixing a misplayed phrase, replacing the timbre of a section, or adjusting details without re-recording.

Key Highlights

  • Change only the specified interval — use mask_start_seconds and mask_end_seconds to define the start and end seconds; content outside the interval stays untouched and the output length remains the same.
  • The prompt describes only the part to change — prompt just needs to explain what the masked interval should become; no need to restate the structure of the whole piece.
  • Works with negative prompts — negative_prompt describes sounds to avoid, such as harsh cymbals or excessive reverb.
  • Reproducible, easy-to-compare results — with seed and interval fixed, adjust only one parameter at a time to hear exactly what that change contributes.

Capability Description

  • Defining the inpainting interval: mask_start_seconds and mask_end_seconds are in seconds; the end time must be later than the start time and must not exceed the source audio duration. For example, with 8 seconds of source audio, a start of 2 and an end of 4 rewrites seconds 2 through 4.
  • Source audio and description: audio_url takes an audio address the service can read; prompt describes the new content, and is more reliable when written in the order "instrument and timbre, performance content, mood and dynamics, recording texture".
  • Guidance strength and avoidance: guidance_scale defaults to 1; higher values follow the prompt more strictly and only take effect on base (non-distilled) checkpoints; negative_prompt defaults to an empty string.
  • Sampling steps: num_inference_steps defaults to 8 and can be set from 1 to 100; distilled checkpoints already perform well at the default, and you can compare different step counts using the same audio and interval.
  • Output and bitrate: output_format supports mp3, wav, flac, ogg, opus, m4a, and aac, defaulting to mp3; bitrate defaults to 192k and accepts 320k, with no effect on wav or flac.

Use Cases

  • Replace the timbre of a section — directly state the target timbre and the object being replaced, e.g. "replace the drum kit in this section with hand percussion while keeping the original tempo and groove".
  • Fix recording flaws — when a phrase is played wrong or noise creeps in, rewrite only that interval instead of re-recording the whole take.
  • Add ambient sound locally — layer rain, crowd noise, or other ambience onto a specified segment while keeping the rest intact.
  • A/B prompt comparison — with seed and interval fixed, test two descriptions separately and compare which better matches expectations.

Limitations and Selection Advice

audio_url, prompt, mask_start_seconds, and mask_end_seconds are all required; the end time must be later than the start time and must not exceed the source audio duration, with a maximum of 380 seconds. prompt is limited to 5000 characters. Where possible, align boundaries with the end of a phrase or a breath rather than cutting mid-note; if the seam still sounds abrupt, extend both ends of the interval slightly and try again. To extend the beginning or end of audio, use "audio continuation"; if you have no source audio, use "text-to-audio".

  • New model stable-audio-3-medium text-to-audio model now available
  • New model stable-audio-3-medium/audio-inpainting is now available
  • New model New model available: stable-audio-3-medium/audio-outpainting

Frequently asked questions

View all FAQs →
  • How long an audio clip can be generated at once?

    duration controls the length, ranging from 1 to 380 seconds (about 6 minutes 20 seconds), with a default of 30 seconds. For longer works, it is recommended to generate them segment by segment, then use audio continuation to connect the segments.

  • What is the maximum length of a prompt?

    The prompt is required, and the platform's input limit per request is 5000 characters. Clearly specifying the instruments, rhythm, mood, and use case is more likely to produce the expected result than piling on adjectives; when the prompt is very short, you can enable enable_prompt_expansion to let the model expand it first.

  • How should prompts be organized when generating music?

    Write in the order of "instruments and timbre, rhythm and groove, emotion and dynamics, scene and texture", and state whether vocals are wanted. Put unwanted elements in negative_prompt, for example noise, distortion, abrupt silence.

  • How can I repair only a segment of the audio?

    Use mask_start_seconds and mask_end_seconds to specify the start and end times in seconds. The end time must be later than the start time and cannot exceed the duration of the source audio. For example, in an 8-second audio clip, setting the start point to 2 and the end point to 4 will repair seconds 2 through 4.

Related Models

View all models →

Same Type