Skip to content

Stable Audio 3 Medium Base Audio Inpainting

Integrate

Model id stable-audio-3/medium/base/audio-inpainting
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/stable-audio-3/medium/base/audio-inpainting?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "mask_start_seconds": 4,
    "mask_end_seconds": 8
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

This request: $0.054 54 API credits Run it on this page

Get API key
Stability AI · Audio

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Text instructions for regenerating the masked region.

•required audio_url
Drop a file, or

Input audio, with regeneration limited to the masked region.

•required

Start time, in seconds, of the region being regenerated.

•required

End time, in seconds, of the region being regenerated.

Advanced negative_prompt · output_format · bitrate · num_inference_steps · guidance_scale · seed · enable_prompt_expansion · enable_safety_checker
default

Text specifying unwanted qualities in the output.

output_format default mp3

Container format used for the resulting audio.

default 192k

Output audio bitrate, ignored when using wav or flac because they are lossless. For compressed formats such as mp3, aac, or opus, supply a value in the form '192k' or '320k'.

default 50

Choose how many sampling steps to run, allowing approximately 50 to obtain good quality when using base (non-distilled) checkpoints.

default 7

Classifier-free guidance strength, for which approximately 7.0 is recommended initially on base checkpoints; raising it makes generation adhere more closely to the prompt.

Random generator seed for repeatable results; leaving it out selects a random seed.

POST /run/stable-audio-3/medium/base/audio-inpainting?wait=20 quote → $0.054
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/stable-audio-3/medium/base/audio-inpainting?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "mask_start_seconds": 4,
    "mask_end_seconds": 8
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Stable Audio 3 Medium Base Audio Inpainting

Regenerates the region of `audio_url` between `mask_start_seconds` and `mask_end_seconds` (up to 380 seconds) from a `prompt`. This non-distilled checkpoint defaults to 50 sampling steps and `guidance_scale` 7, which has real effect here. Output formats include mp3, wav, flac, ogg, opus, m4a and aac.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
negative_promptoptional
Typestring
Default
Text specifying unwanted qualities in the output.
num_inference_stepsoptional
Typeinteger
Default50
1 – 100
Choose how many sampling steps to run, allowing approximately 50 to obtain good quality when using base (non-distilled) checkpoints.
guidance_scaleoptional
Typenumber
Default7
0 – 25
Classifier-free guidance strength, for which approximately 7.0 is recommended initially on base checkpoints; raising it makes generation adhere more closely to the prompt.
seedoptional
Typeinteger | null
Random generator seed for repeatable results; leaving it out selects a random seed.
enable_prompt_expansionoptional
Typeboolean
Defaultfalse
Prompt expansion using an LLM when enabled, adding detail and improving result quality.
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Safety checking for NSFW content.
output_formatoptional
Typeenum
Defaultmp3
mp3wavflacoggopusm4aaac
Container format used for the resulting audio.
bitrateoptional
Typestring
Default192k
Output audio bitrate, ignored when using wav or flac because they are lossless. For compressed formats such as mp3, aac, or opus, supply a value in the form '192k' or '320k'.
promptrequired
Typestring
Text instructions for regenerating the masked region.
audio_urlrequired audio
Typeurl · audio
Input audio, with regeneration limited to the masked region.
mask_start_secondsrequired
Typenumber
0 – 380
Start time, in seconds, of the region being regenerated.
mask_end_secondsrequired
Typenumber
0 – 380
End time, in seconds, of the region being regenerated.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "stable-audio-3/medium/base/audio-inpainting",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 54,
    "usd": "0.054",
    "charged": 54,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "audio_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "mask_start_seconds": 4,
    "mask_end_seconds": 8
  },
  "output": {
    "audio": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_name": "0-output.mp3",
      "file_size": 1843200
    },
    "seed": 42,
    "prompt": "string"
  },
  "outputs": [
    {
      "type": "audio",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_size": 1843200,
      "duration": 12,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
audio
object {url, content_type, file_name, file_size}Audio clip produced by generation.
seed
integerSeed that controlled randomness during generation.
prompt
stringPrompt that was used to generate the output.

More models: Audio

For AI agents: this page as Markdown is at https://doitong.com/developers/models/stable-audio-3/medium/base/audio-inpainting.md. All models and guides: https://doitong.com/developers/llms.txt