Skip to content

Stable Audio 3 · Medium · Text to Audio

Integrate

Model id stable-audio-3/medium/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/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.038 38 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 8

Sampling iteration count, defaulting to 8 because distilled, post-trained checkpoints already achieve good quality there; additional iterations offer little benefit.

default 1

Classifier-free guidance strength for base checkpoints only; distilled checkpoints are unaffected. On applicable checkpoints, increasing it tightens adherence to the prompt.

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

POST /run/stable-audio-3/medium/text-to-audio?wait=20 quote → $0.038
# 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/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 · Text to Audio

Creates audio from a text `prompt`, optionally with a `negative_prompt`. This post-trained variant defaults to 8 sampling steps and gains little from more, and guidance scale defaults to 1 because it only has an effect on base checkpoints. `duration` runs from 1 to 380 seconds. Choose from mp3, wav, flac, ogg, opus, m4a or aac output.

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
Default8
1 – 100
Sampling iteration count, defaulting to 8 because distilled, post-trained checkpoints already achieve good quality there; additional iterations offer little benefit.
guidance_scaleoptional
Typenumber
Default1
0 – 25
Classifier-free guidance strength for base checkpoints only; distilled checkpoints are unaffected. On applicable checkpoints, increasing it tightens adherence 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/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": 38,
    "usd": "0.038",
    "charged": 38,
    "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/text-to-audio.md. All models and guides: https://doitong.com/developers/llms.txt