# Stable Audio 3 Small Music Base Audio to Audio

> Stable Audio 3 Small Music Base audio-to-audio is the foundational 459 million parameter checkpoint that transforms input music into new variations up to 2 minutes guided by text prompts.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/stable-audio-3/small/music/base/audio-to-audio`
- **Model ID**: `fal-ai/stable-audio-3/small/music/base/audio-to-audio`
- **Category**: audio-to-audio
- **Kind**: inference
**Tags**: music, style-transfer, remix



## Pricing

- **Price**: $0.032 per audios

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`negative_prompt`** (`string`, _optional_):
  Text description of qualities to avoid in the output. Default value: `""`
  - Default: `""`

- **`duration`** (`float`, _optional_):
  Duration of the generated audio in seconds. Default value: `30`
  - Default: `30`
  - Range: `1` to `120`

- **`num_inference_steps`** (`integer`, _optional_):
  Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. Default value: `50`
  - Default: `50`
  - Range: `1` to `100`

- **`guidance_scale`** (`float`, _optional_):
  Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. Default value: `7`
  - Default: `7`
  - Range: `0` to `25`

- **`seed`** (`integer`, _optional_):
  Random seed for reproducible outputs. Omit for a random seed.

- **`enable_prompt_expansion`** (`boolean`, _optional_):
  If True, the prompt will be expanded using an LLM for more detailed and higher quality results.
  - Default: `false`

- **`enable_safety_checker`** (`boolean`, _optional_):
  Enable NSFW content safety checking. Default value: `true`
  - Default: `true`

- **`sync_mode`** (`boolean`, _optional_):
  If True, the audio is returned inline as a data URI and the result is not saved to the request history.
  - Default: `false`

- **`output_format`** (`OutputFormatEnum`, _optional_):
  Container format for the generated audio output. Default value: `"mp3"`
  - Default: `"mp3"`
  - Options: `"mp3"`, `"wav"`, `"flac"`, `"ogg"`, `"opus"`, `"m4a"`, `"aac"`

- **`bitrate`** (`string`, _optional_):
  Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). Default value: `"192k"`
  - Default: `"192k"`

- **`prompt`** (`string`, _required_):
  Text description guiding how the source audio should be transformed.
  - Examples: "bossa nova bassline"

- **`audio_url`** (`string`, _required_):
  Source audio to transform.
  - Examples: "https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav"

- **`init_noise_level`** (`float`, _optional_):
  How much noise to add to the source audio. 1.0 fully replaces the audio with noise (pure generation); 0.1 keeps the source close to the input. 0.5 sits halfway between. Default value: `0.9`
  - Default: `0.9`
  - Range: `0` to `1`



**Required Parameters Example**:

```json
{
  "prompt": "bossa nova bassline",
  "audio_url": "https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav"
}
```

**Full Example**:

```json
{
  "duration": 30,
  "num_inference_steps": 50,
  "guidance_scale": 7,
  "enable_safety_checker": true,
  "output_format": "mp3",
  "bitrate": "192k",
  "prompt": "bossa nova bassline",
  "audio_url": "https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav",
  "init_noise_level": 0.9
}
```


### Output Schema

The API returns the following output format:

- **`audio`** (`File`, _required_):
  The generated audio clip.

- **`seed`** (`integer`, _required_):
  The random seed used for generation.

- **`prompt`** (`string`, _required_):
  The prompt used for generation.



**Example Response**:

```json
{
  "audio": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019
  },
  "prompt": ""
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/stable-audio-3/small/music/base/audio-to-audio \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "bossa nova bassline",
     "audio_url": "https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/stable-audio-3/small/music/base/audio-to-audio",
    arguments={
        "prompt": "bossa nova bassline",
        "audio_url": "https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/stable-audio-3/small/music/base/audio-to-audio", {
  input: {
    prompt: "bossa nova bassline",
    audio_url: "https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Deploy your own model

To run your own weights, a fine-tune or a custom pipeline on the GPUs that serve this API, deploy it on fal Serverless. GPUs from H100 (80GB) to B300 (288GB), billed per second; an H100 is $4.50/h list, as low as $2.49/h. Prices, GPU specs and deploy steps: [fal Serverless](https://fal.ai/serverless.md).

## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/fal-ai/stable-audio-3/small/music/base/audio-to-audio)
- [API Documentation](https://fal.ai/models/fal-ai/stable-audio-3/small/music/base/audio-to-audio/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/stable-audio-3/small/music/base/audio-to-audio)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- [Pricing](https://fal.ai/pricing.md): Model API and Serverless GPU prices
- [fal Serverless](https://fal.ai/serverless.md): Deploy your own models: GPU prices, specs and steps
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
