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 refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance_scale | No | float | 1 | 0–25 | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| 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 | — | Automatically rewrites and enriches your prompt with extra detail before generation to improve results. |
| enable_safety_checker | No | boolean | true | — | Turns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it. |
| seed | No | integer | — | — | Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
| sync_mode | No | boolean | false | — | If on, the finished file is sent back directly instead of as a download link. Handy for quick tests; for normal use, leave it off to get a download link. |
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
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/samples/stable-audio-3-a2a-input.wav"
}
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/samples/stable-audio-3-a2a-input.wav"
}
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/samples/stable-audio-3-a2a-input.wav"
};
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/samples/stable-audio-3-a2a-input.wav"
}'
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 refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance_scale | No | float | 1 | 0–25 | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| 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 | — | Automatically rewrites and enriches your prompt with extra detail before generation to improve results. |
| enable_safety_checker | No | boolean | true | — | Turns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it. |
| seed | No | integer | — | — | Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
| sync_mode | No | boolean | false | — | If on, the finished file is sent back directly instead of as a download link. Handy for quick tests; for normal use, leave it off to get a download link. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| audio | 1 | MP3, WAV | Reference audio to transform. |
Example Request
{
"prompt": "Transform this into a cinematic orchestral arrangement with sweeping strings",
"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/samples/stable-audio-3-a2a-input.wav",
"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.