Stable Audio 3 API - AI Music and Audio Generation APIs: Pricing, Documentation
by Stability AI
Stable Audio 3 API delivers a powerful and direct way to build high-quality music and sound effects right into your own apps. Created by Stability AI, this cutting-edge tool uses advanced artificial intelligence to turn simple text prompts into clear, commercial-grade audio tracks. Users can easily control the style, rhythm, and length of the music to match their exact needs without relying on any outside middleware or extra software layers. It gives developers a smooth, reliable pipeline to generate custom audio on demand, making it perfect for video games, content creation tools, and modern digital media platforms.

Models Version
Get $5 Free Credit on First Payment
No strings attached — add funds and get $5 bonus instantly
Stable Audio 3 API Documentation
https://gateway.pixazo.ai/stable-audio-3-small-music-text-to-audio/v1/stable-audio-3-small-music-text-to-audio-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Stable Audio 3 Small Music Text to Audio generate request
Request Code
POST https://gateway.pixazo.ai/stable-audio-3-small-music-text-to-audio/v1/stable-audio-3-small-music-text-to-audio-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "Upbeat lo-fi hip hop with mellow piano, warm bassline, and crisp drums",
"negative_prompt": "",
"duration": 30,
"num_inference_steps": 8,
"guidance_scale": 1,
"output_format": "mp3",
"bitrate": "192k",
"enable_prompt_expansion": false,
"enable_safety_checker": true,
"sync_mode": false
}
import requests
url = "https://gateway.pixazo.ai/stable-audio-3-small-music-text-to-audio/v1/stable-audio-3-small-music-text-to-audio-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "Upbeat lo-fi hip hop with mellow piano, warm bassline, and crisp drums",
"negative_prompt": "",
"duration": 30,
"num_inference_steps": 8,
"guidance_scale": 1,
"output_format": "mp3",
"bitrate": "192k",
"enable_prompt_expansion": false,
"enable_safety_checker": true,
"sync_mode": false
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/stable-audio-3-small-music-text-to-audio/v1/stable-audio-3-small-music-text-to-audio-request";
const data = {
prompt: "Upbeat lo-fi hip hop with mellow piano, warm bassline, and crisp drums",
negative_prompt: "",
duration: 30,
num_inference_steps: 8,
guidance_scale: 1,
output_format: "mp3",
bitrate: "192k",
enable_prompt_expansion: false,
enable_safety_checker: true,
sync_mode: false
};
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/stable-audio-3-small-music-text-to-audio/v1/stable-audio-3-small-music-text-to-audio-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "Upbeat lo-fi hip hop with mellow piano, warm bassline, and crisp drums",
"negative_prompt": "",
"duration": 30,
"num_inference_steps": 8,
"guidance_scale": 1,
"output_format": "mp3",
"bitrate": "192k",
"enable_prompt_expansion": false,
"enable_safety_checker": true,
"sync_mode": false
}'
Output
{
"request_id": "stable-audio-3-small-music-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-audio-3-small-music-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Stable Audio 3 Small Music Text to Audio generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text description of the audio to generate. Must be descriptive and specific for best results. |
| negative_prompt | No | string | "" | — | Qualities to avoid in the output, such as "distorted vocals" or "heavy reverb". |
| duration | No | float | 30 | 1–120 | Output length in seconds. Allowed range: 1 to 120. |
| num_inference_steps | No | integer | 8 | 1–100 | Number of sampling steps during generation. Higher values improve quality at the cost of speed. |
| guidance_scale | No | float | 1 | 0–25 | Classifier-free guidance scale. Controls how closely the output follows the prompt. |
| output_format | No | enum | "mp3" | "mp3", "wav", "flac", "ogg", "opus", "m4a", "aac" | Audio file format. |
| bitrate | No | string | "192k" | — | Audio bitrate. Examples: "192k", "320k", "128k". Higher bitrates improve quality but increase file size. |
| enable_prompt_expansion | No | boolean | false | — | Enables LLM-based prompt enhancement to enrich and expand the input description. |
| enable_safety_checker | No | boolean | true | — | Enables NSFW content filtering. Disabling may allow inappropriate content. |
| seed | No | integer | — | — | Random seed for reproducible results. Use the same seed with identical parameters to generate identical outputs. |
| sync_mode | No | boolean | false | — | If true, returns the audio as a base64-encoded data URI inline in the response. If false, returns a request_id for asynchronous polling. |
Example Request
{
"prompt": "Upbeat lo-fi hip hop with mellow piano, warm bassline, and crisp drums",
"negative_prompt": "",
"duration": 30,
"num_inference_steps": 8,
"guidance_scale": 1,
"output_format": "mp3",
"bitrate": "192k",
"enable_prompt_expansion": false,
"enable_safety_checker": true,
"sync_mode": false
}
Response
{
"request_id": "stable-audio-3-small-music-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-audio-3-small-music-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'stable-audio-3-small-music-text-to-audio' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "stable-audio-3-small-music-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "stable-audio-3-small-music-text-to-audio",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/stable-audio-3-small-music-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "stable-audio-3-small-music-text-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "stable-audio-3-small-music-text-to-audio",
"error": null,
"output": {
"media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-audio-3-small-music-text-to-audio_019dxxxx/output.mp3"],
"media_type": "audio/mpeg"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Stable Audio 3 API Pricing
No data available
Could not load current pricing
Stable Audio 3 API Documentation
https://gateway.pixazo.ai/stable-audio-3-small-music-audio-to-audio/v1/stable-audio-3-small-music-audio-to-audio-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Stable Audio 3 Small Music Audio to Audio generate request
Request Code
POST https://gateway.pixazo.ai/stable-audio-3-small-music-audio-to-audio/v1/stable-audio-3-small-music-audio-to-audio-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "Transform this into a cinematic orchestral arrangement with sweeping strings",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Audio.mp3"
}
import requests
url = "https://gateway.pixazo.ai/stable-audio-3-small-music-audio-to-audio/v1/stable-audio-3-small-music-audio-to-audio-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "Transform this into a cinematic orchestral arrangement with sweeping strings",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Audio.mp3"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/stable-audio-3-small-music-audio-to-audio/v1/stable-audio-3-small-music-audio-to-audio-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
"prompt": "Transform this into a cinematic orchestral arrangement with sweeping strings",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Audio.mp3"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/stable-audio-3-small-music-audio-to-audio/v1/stable-audio-3-small-music-audio-to-audio-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "Transform this into a cinematic orchestral arrangement with sweeping strings",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Audio.mp3"
}'
Output
{
"request_id": "stable-audio-3-small-music-audio-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-audio-3-small-music-audio-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Stable Audio 3 Small Music Audio to Audio generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text description guiding how the source audio should be transformed. |
| audio_url | Yes | string | — | — | URL of the source audio to transform. Supported formats: mp3, ogg, wav, m4a, aac. |
| init_noise_level | No | float | 0.9 | 0–1 | How much noise to add to the source audio (0-1). Lower values keep the output closer to the source; higher values allow more creative deviation. |
| negative_prompt | No | string | "" | — | Qualities to avoid in the output. |
| duration | No | float | 30 | 1–120 (seconds) | Output length in seconds (1-120). |
| num_inference_steps | No | integer | 8 | 1–100 | Number of sampling steps (1-100). |
| guidance_scale | No | float | 1 | 0–25 | Classifier-free guidance scale (0-25). |
| output_format | No | enum | "mp3" | "mp3", "wav", "flac", "ogg", "opus", "m4a", "aac" | Audio output format. Allowed: mp3, wav, flac, ogg, opus, m4a, aac. |
| bitrate | No | string | "192k" | — | Audio bitrate for compressed formats (e.g., "128k", "192k", "320k"). |
| enable_prompt_expansion | No | boolean | false | — | Enable LLM-based prompt enhancement for improved semantic richness. |
| enable_safety_checker | No | boolean | true | — | Enable NSFW content filter to block inappropriate outputs. |
| seed | No | integer | — | — | Random seed for reproducibility. If omitted, a random seed is used. |
| sync_mode | No | boolean | false | — | If true, returns the audio as a data URI inline in the response instead of a URL. |
Example Request
{
"prompt": "Transform this into a cinematic orchestral arrangement with sweeping strings",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Audio.mp3",
"init_noise_level": 0.9,
"negative_prompt": "",
"duration": 30,
"num_inference_steps": 8,
"guidance_scale": 1,
"output_format": "mp3",
"bitrate": "192k",
"enable_prompt_expansion": false,
"enable_safety_checker": true,
"sync_mode": false
}
Response
{
"request_id": "stable-audio-3-small-music-audio-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/stable-audio-3-small-music-audio-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'stable-audio-3-small-music-audio-to-audio' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "stable-audio-3-small-music-audio-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "stable-audio-3-small-music-audio-to-audio",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/stable-audio-3-small-music-audio-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "stable-audio-3-small-music-audio-to-audio_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "stable-audio-3-small-music-audio-to-audio",
"error": null,
"output": {
"media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/stable-audio-3-small-music-audio-to-audio_019dxxxx/output.mp3"],
"media_type": "audio/mpeg"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Stable Audio 3 API Pricing
No data available
Could not load current pricing