Skip to main content
stability-ai avatar

Stable Audio 2.5 API

stability-ai/stable-audio-2.5/text-to-audio

Generate long-form music and sound effects from a text prompt — up to ~190 seconds of WAV audio in a single call.

0.2

Model Input

Input

The prompt to generate audio from. Describe genre, instrumentation, mood, and tempo for music, or the source, environment, and materials for sound effects.

Min: 1 - Max: 190

Duration of the generated audio in seconds (1-190). Billing is a flat rate per generation regardless of length.

Additional Settings

Customize your input with more control.

Min: 4 - Max: 8

Number of denoising steps. More steps can improve quality at the cost of speed.

Min: 1 - Max: 25

Classifier-free guidance scale; higher values follow the prompt more strictly.

Random seed for reproducible generation. Leave empty for a random result.

You need to be logged in to run this model and view results.
Log in

Model Output

Output

Loading
Generated in 3.738 seconds
Logs (1 lines)

Model Example Requests

Examples

Stable Audio 2.5 API

Stable Audio 2.5 is a music AI model by stability-ai. On ModelRunner it runs through a REST API or via MCP from any AI assistant, at $0.2 per audio clip.

POST https://queue.modelrunner.run/stability-ai/stable-audio-2.5/text-to-audio

cURL

# Submit a request to the queue. Input fields go at the top level of the
# body. The optional reserved "metadata" object holds your own flat string
# tags — stored on the request, never sent to the model; filter later with
# GET https://queue.modelrunner.run/requests?metadata=<url-encoded JSON>.
curl -X POST https://queue.modelrunner.run/stability-ai/stable-audio-2.5/text-to-audio \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "warm analog synthwave with a punchy kick, arpeggiated bassline, and dreamy pads, 110 bpm, instrumental",
    "seconds_total": 30,
    "guidance_scale": 1,
    "num_inference_steps": 8,
    "metadata": {
      "project": "my-project"
    }
  }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }

# Poll status_url until "COMPLETED", then fetch the result
curl "https://queue.modelrunner.run/stability-ai/stable-audio-2.5/text-to-audio/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/stability-ai/stable-audio-2.5/text-to-audio/requests/$REQUEST_ID" \
  -H "Authorization: Key $MRUN_API_KEY"

JavaScript

import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("stability-ai/stable-audio-2.5/text-to-audio", {
  input: {
    "prompt": "warm analog synthwave with a punchy kick, arpeggiated bassline, and dreamy pads, 110 bpm, instrumental",
    "seconds_total": 30,
    "guidance_scale": 1,
    "num_inference_steps": 8
  },
});
console.log(result);

Python

import os
import requests

headers = {"Authorization": f"Key {os.environ['MRUN_API_KEY']}"}

submitted = requests.post(
    "https://queue.modelrunner.run/stability-ai/stable-audio-2.5/text-to-audio",
    headers=headers,
    json={
      "prompt": "warm analog synthwave with a punchy kick, arpeggiated bassline, and dreamy pads, 110 bpm, instrumental",
      "seconds_total": 30,
      "guidance_scale": 1,
      "num_inference_steps": 8
    },
).json()

# Poll submitted["status_url"] until "COMPLETED", then:
result = requests.get(submitted["response_url"], headers=headers).json()

Input parameters

NameTypeRequiredDescription
promptstringyesThe prompt to generate audio from. Describe genre, instrumentation, mood, and tempo for music, or the source, environment, and materials for sound effects.
seconds_totalintegernoDuration of the generated audio in seconds (1-190). Billing is a flat rate per generation regardless of length. Default: 190.
num_inference_stepsintegernoNumber of denoising steps. More steps can improve quality at the cost of speed. Default: 8.
guidance_scalenumbernoClassifier-free guidance scale; higher values follow the prompt more strictly. Default: 1.
seedintegernoRandom seed for reproducible generation. Leave empty for a random result.

Machine-readable: OpenAPI schema · llms.txt

Use Stable Audio 2.5 from Claude & Cursor (MCP)

Point Claude Code, Claude Desktop, Cursor, or any MCP client at the ModelRunner MCP server and Stable Audio 2.5 becomes a tool your assistant can call directly — it authorizes via OAuth (no API key in config) and runs this model with the run_model tool using the endpoint stability-ai/stable-audio-2.5/text-to-audio.

MCP client config (Claude Desktop, Cursor)

{
  "mcpServers": {
    "modelrunner": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.modelrunner.run/mcp"]
    }
  }
}

Claude Code

claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcp

Then ask your assistant, for example: “Run stability-ai/stable-audio-2.5/text-to-audio on ModelRunner to generate music”. MCP setup guide.

Model Details

Model Details

Stable Audio 2.5 turns a written description into a finished audio clip — a piece of music, a soundscape, ambience, or a sound effect — up to about 190 seconds long, returned as a WAV file. Write what you want in the `prompt` ("driving synthwave with a punchy kick and arpeggiated bass", "gentle rain on a window with distant thunder", "upbeat corporate acoustic bed, no vocals") and set `seconds_total` to control the length. Its standout strength is long-form generation: unlike short sound-effect models capped at a few seconds, a single call can produce minutes-long tracks suitable for full backing music, and it was trained on a fully licensed dataset for commercial-safe output.

## Best for - Background music and instrumental beds for videos, ads, podcasts, and games - Long-form tracks and loops up to about three minutes from a single text prompt - Ambience and soundscapes (rain, cafe noise, forest, room tone) for scenes - One-off sound effects and foley described in plain language - Royalty-conscious audio where a commercially-safe, licensed-data model matters

## Choose another model when - You want to transform or restyle an existing audio clip rather than generate from text — use an audio-to-audio model - You need natural spoken narration or a specific voice — use a text-to-speech model - You only need a very short one-shot effect and want per-second billing on tiny clips — a per-second sound-effect model may be cheaper

## Tips - `seconds_total` accepts 1–190 seconds; billing is a flat rate per generation, so longer clips cost the same as short ones - Describe genre, instrumentation, mood, and tempo in the prompt for music; describe the source, environment, and materials for sound effects - Say "no vocals" or "instrumental" in the prompt when you want a clean music bed - Raise `num_inference_steps` (up to 8) for a quality bump; raise `guidance_scale` for stricter prompt adherence

## Limitations - Output is a single WAV clip per call; there is no multi-track or stem separation - Very short durations can produce less musically-developed results than longer clips

To run via the ModelRunner JavaScript client: ```js import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("stability-ai/stable-audio-2.5/text-to-audio", { input: { prompt: "upbeat lofi hip hop instrumental with a warm vinyl texture", seconds_total: 60, }, }); ```