Notice: Black Friday 2026 × Cyber Monday: Get up to 30% extra on top-ups, DeepSeek free to use · View the promotion
Blog

Guide

Stable Audio 3 Medium Audio Inpainting Getting Started Guide: Capabilities, Pricing, and Best Practices

Nov 26, 2026
Flat woven pattern with interwoven dark brown and oatmeal wide bands, accented with brass-colored threads, for the Stable Audio 3 audio inpainting guide cover
On this page

Why an audio inpainting model is needed

Audio engineering has a category of needs that is entirely different from "generate a piece of music from a single sentence": you already have a piece of audio, it's just incomplete. It might be that a short segment was cut out of the middle of a recording, that noise reduction left an obvious hole, or that half a second of transition is missing between the intro and the verse. For this kind of task, the input is "the existing context," and the output is "the piece that fills into the context" so that the seam cannot be heard.

This is exactly the problem audio-inpainting solves. It is a form of conditional generation: the model infers what should appear in the middle based on the audio content before and after the region to be repaired, rather than building an entire soundscape from scratch from a text prompt. Conflating these two types of tasks is the most common source of expectation mismatch during integration.

From an engineering perspective, the value of audio inpainting is that it is embedded in an existing workflow rather than replacing it. It does not require you to reproduce the source material; it only performs localized regeneration for the gap. Understanding this makes subsequent parameter choices, cost estimation, and validation methods much smoother.

Deep brown and oatmeal-colored woven bands form a horizontal sound wave, with the gap in the middle seamlessly filled by new brass-colored woven bands, illustrating audio inpainting.
The gap is rewoven: audio inpainting does not generate from scratch; it weaves a broken sound wave back into a continuous segment.

Capability boundaries of stable-audio-3-medium

The capability description of stable-audio-3-medium/audio-inpainting is clear: audio-inpainting, with an output type of audio. In other words, the purpose of calling it should be to complete missing or redo-needed segments in an input audio, and the product is still audio that can be plugged directly back into your processing chain.

Regarding capability boundaries, it is recommended to understand them as follows:

  • Clearly supported: audio inpainting, i.e., filling and regenerating localized regions in existing audio.
  • Output form: audio, not textual analysis or structured annotation.
  • Requires own validation: the allowed input audio duration range, supported sample rates and channel counts, the maximum length of a single repairable region, and differences in inpainting quality across music/speech/environmental sound types. These details must be based on actual invocation results before integration; do not assume from experience.

If the task is essentially to generate a brand-new piece of audio from scratch, then this model is not the right choice; you should look at other audio generation capabilities on the platform. The first step in model selection is always to classify the task.

Deep brown and oatmeal-colored plain woven bands form concentric circles: the solid ring at the center represents the core of audio inpainting, and the fading woven area on the periphery represents unverified capabilities.
The solid woven core is the verified audio inpainting capability; the fading banded area on the periphery indicates boundaries that still need to be verified by yourself.

Pricing structure and cost estimation

This model is billed per audio clip, at a unit price of $0.0632. Understanding this billing basis is more important than remembering the number: cost scales linearly with the number of calls, and has no direct conversion relationship with audio duration or the length of the repaired region. You send one request and produce one audio clip, and that counts as one charge.

This leads to two direct corollaries. First, cost estimation is very simple: multiply the unit price by the number of planned calls to get the budget magnitude. For batch tasks, you can build a budget table directly using "number of clips"; there is no need to first measure audio seconds. Second, the lever for cost control is request granularity, not audio content—rather than trying to compress duration, try to reduce invalid requests.

Invalid requests usually come from three situations: calls failing because parameters do not satisfy constraints, repeatedly submitting the same material during the trial-and-error phase, and rushing to repair before upstream processing is complete. Note the billing boundary: requests rejected during the input validation stage do not incur charges, but a rerun that has already been submitted for execution and is only rerun because the result is unsatisfactory will be charged. Therefore, "validate first, then call" is still a real cost-saving action on per-clip billing models.

Please note that the specific price is subject to the price panel displayed on the site; this article only explains the billing basis and does not take responsibility for price synchronization.

An abstract bar chart rising like woven-band steps, symbolizing that cost accumulates per clip as audio call volume increases.
Each level climbed by the wide woven band represents a batch of audio calls; the copper-colored accent threads show how per-clip pricing accumulates into total cost along with call volume.

Parameter and invocation preparation before integration

Before writing business code formally, go through the following checklist to avoid the vast majority of invalid calls:

  • Input audio: confirm that the format, sample rate, and channel count fall within the supported range. If unsure, first use a sample in a standard format to get the pipeline working.
  • Repair region: clearly identify which segment needs to be regenerated, and try to place the boundaries on natural audio gaps, avoiding hard cuts in the middle of sustained sounds.
  • Duration constraints: first confirm the maximum audio length that a single call can process; for overly long material, plan a segmentation strategy in advance.
  • Output format: confirm that the returned audio format is compatible with your post-processing chain and can be directly stored or sent to the next stage.
  • Error handling: reserve retry and fallback paths for timeouts, rate limiting, and parameter validation failures; do not call it raw on the main business path.

The corresponding parameters are not abstract: submit the source audio with audio_url; specify the interval to regenerate with mask_start_seconds and mask_end_seconds, in seconds, where the end must be later than the start and must not exceed the source audio duration; prompt describes the sound you want to appear in this segment; the output is determined by output_format (default mp3) and bitrate (default 192k); once seed is fixed, the same result can be reproduced.

The recommended self-test process is: first run a complete call with a short sample of about ten seconds, confirm that the input is correctly received, the output can be decoded and played normally, and the inpainting sounds acceptable; then solidify this set of parameters into a template and expand to longer material and batch tasks.

Typical usage and combined scenarios

Audio inpainting rarely exists on its own; it usually sits in the middle of a processing pipeline. Placing it in the correct process position makes both quality and cost more controllable.

A common combination is "preprocessing → inpainting → post-processing." Upstream preprocessing may include segmentation, noise reduction, and silence removal; the inpainting stage is specifically responsible for filling back the gaps produced during processing; post-processing then performs loudness normalization, concatenation, and export. The advantage of this division of labor is that the inpainting model only needs to face input that is as clean as possible, without simultaneously dealing with both noise and structural missingness.

Another typical scenario is the continuation between intros, outros, and sections. When you concatenate multiple pieces of material into one long audio, the seams often have an abrupt sense of breakage. Rather than repeatedly trying to adjust fade-in/fade-out parameters, it is better to hand a small segment near the seam to the inpainting model for regeneration, letting the transition be inferred from context.

There is also a category of scenarios: localized regeneration. When a segment has already been recorded but the atmosphere or details are unsatisfactory, keeping the content before and after unchanged and only redoing the middle block is often more time-saving than re-recording the whole segment. The key is to choose boundaries for the region to be redone at places with natural breakpoints, reducing the inference burden on the model.

Result validation and troubleshooting approach

Validation should start from the smallest unit. Use short samples to confirm that the model can correctly receive your audio, return a playable result, and make the inpainted region sound acceptable; this is the only reliable basis for judging whether the entire pipeline is ready. After short samples pass, gradually lengthen and increase volume; when problems occur, it is also easier to locate whether the issue is parameters, material, or the joining method.

When troubleshooting, check in the following order to avoid detours:

  1. Whether the request succeeded: first check for explicit issues such as parameter validation failure, unsupported format, or rejection due to excessive length; these errors can be resolved by changing parameters.
  2. Whether the output can be decoded: if it returns but cannot play, it is mostly a format or sample rate mismatch; check consistency between the output and the post-processing chain.
  3. Whether the seam is natural: when inpainting region boundaries are cut too abruptly, the perceptual problem often lies at the boundary rather than in the model itself; adjust the region start and end points and listen again.
  4. Whether retry is needed: occasional server-side failures merit a limited number of retries; but repeated failures on the same material indicate an input or parameter problem, and retrying will only add invalid calls.

Recording the input summary, parameters, and result status of each call is an implicit means of cost control—without logs, you cannot distinguish between "the model's result is poor" and "the call simply did not succeed."

Best practices and model selection advice

Based on the above, here are several recommendations for implementation: validate results with short samples before scaling up; put parameter validation before the call rather than after; set call count limits and failure circuit breakers for batch tasks to prevent abnormal loops from burning through the budget; choose models by task type rather than forcing all audio needs onto a single model—generating from scratch, localized inpainting, and format conversion are fundamentally different tasks, so compare other audio models on the platform before deciding.

If you are evaluating whether audio-inpainting fits your scenario, you can first visit the stable-audio-3-medium/audio-inpainting model details page to check the current capability description and billing basis, and run a small-scale validation with a piece of real material; that will explain more than any parameter document.

Related articles

View all articles →

Start building with persistent AI artifacts

Get your API key and call image, video and audio models through one task-based API.

Read the API docs