Skip to content

Stable Audio 3 Medium Base Text to Audio

Integrate

Model id stable-audio-3/medium/base/text-to-audio
# 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/text-to-audio?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"
  }'

# 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.048 48 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 specifying the desired audio content.

default 30

Audio length in seconds, with a medium-model maximum of 380 seconds (approximately 6 minutes 20 seconds).

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/text-to-audio?wait=20 quote → $0.048
# 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/text-to-audio?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"
  }'

# 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 Text to Audio

Generates audio from a text `prompt`, with an optional `negative_prompt` to steer away from unwanted qualities. `duration` ranges from 1 to 380 seconds. As the non-distilled base checkpoint it defaults to 50 sampling steps and a guidance scale of 7, and guidance up to 25 is accepted. Output formats include mp3, wav, flac, ogg, opus, m4a and aac.

Parameters

NameType DefaultAllowed Description
negative_promptoptional
Typestring
Default
Text specifying unwanted qualities in the output.
durationoptional
Typenumber
Default30
1 – 380
Audio length in seconds, with a medium-model maximum of 380 seconds (approximately 6 minutes 20 seconds).
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 specifying the desired audio content.
required

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "stable-audio-3/medium/base/text-to-audio",
  "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": 48,
    "usd": "0.048",
    "charged": 48,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "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/text-to-audio.md. All models and guides: https://doitong.com/developers/llms.txt