# Mirelo SFX2.0

> Generates synchronized soundtracks from an input video and returns them as audio files. Supports text guidance, negative prompts, multiple samples, preservation of existing speech, and selectable audio formats.


## Overview

- **Endpoint**: `https://fal.run/mirelo-ai/sfx2.0/video-to-audio`
- **Model ID**: `mirelo-ai/sfx2.0/video-to-audio`
- **Category**: video-to-audio
- **Kind**: inference
**Tags**: video-to-audio, sfx



## Pricing

Billing is calculated per second of output and per sample. From **October 14 through December 13, 2026**, the introductory price is **$0.010 per second**, reduced from **$0.015 per second** (approximately **33% off**). Standard pricing of **$0.015 per second** resumes on **December 14, 2026**. For example, **two 10-second samples** cost **$0.20** during the promotion and **$0.30** at the standard rate.

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:


- **`video_url`** (`string`, _required_):
  Video URL to add sound to.
  - Examples: "https://di3otfzjg1gxa.cloudfront.net/chase.mp4"

- **`text_prompt`** (`string`, _optional_):
  Optional text prompt guiding generation.

- **`negative_prompt`** (`string`, _optional_):
  Sounds to keep out of the result, as a short comma-separated list.

- **`preserve_speech`** (`boolean`, _optional_):
  Keep the speech in the input's audio and generate the rest of the soundtrack around it. False generates sound effects only and suppresses speech. Default value: `true`
  - Default: `true`

- **`duration`** (`float`, _optional_):
  Seconds of sound to generate, at least 1 s, clamped to the video's length. Over 10 s generates in 10 s windows. A video shorter than 1 s answers 400. Default value: `10`
  - Default: `10`
  - Range: `1` to `600`

- **`num_samples`** (`integer`, _optional_):
  Number of variations to generate. Default value: `2`
  - Default: `2`
  - Range: `1` to `4`

- **`seed`** (`integer`, _optional_):
  Seed for generation. -1 or None for random.
  - Range: `-1` to `18446744073709552000`

- **`upload_audio_format`** (`UploadAudioFormatEnum`, _optional_):
  Audio format to return Default value: `"wav"`
  - Default: `"wav"`
  - Options: `"wav"`, `"mp3"`, `"aac"`, `"flac"`



**Required Parameters Example**:

```json
{
  "video_url": "https://di3otfzjg1gxa.cloudfront.net/chase.mp4"
}
```

**Full Example**:

```json
{
  "video_url": "https://di3otfzjg1gxa.cloudfront.net/chase.mp4",
  "preserve_speech": true,
  "duration": 10,
  "num_samples": 2,
  "upload_audio_format": "wav"
}
```


### Output Schema

The API returns the following output format:

- **`model`** (`string`, _required_)

- **`audio`** (`list<Audio>`, _required_):
  Each generated soundtrack as an audio file, without the video
  - Array of Audio
  - Examples: [{"url":"https://di3otfzjg1gxa.cloudfront.net/chase_output_1.wav","file_name":"generated_audio_1.wav","content_type":"audio/wav"}]



**Example Response**:

```json
{
  "model": "",
  "audio": [
    {
      "url": "https://di3otfzjg1gxa.cloudfront.net/chase_output_1.wav",
      "file_name": "generated_audio_1.wav",
      "content_type": "audio/wav"
    }
  ]
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/mirelo-ai/sfx2.0/video-to-audio \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "video_url": "https://di3otfzjg1gxa.cloudfront.net/chase.mp4"
   }'
```

### 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(
    "mirelo-ai/sfx2.0/video-to-audio",
    arguments={
        "video_url": "https://di3otfzjg1gxa.cloudfront.net/chase.mp4"
    },
    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("mirelo-ai/sfx2.0/video-to-audio", {
  input: {
    video_url: "https://di3otfzjg1gxa.cloudfront.net/chase.mp4"
  },
  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);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/mirelo-ai/sfx2.0/video-to-audio)
- [API Documentation](https://fal.ai/models/mirelo-ai/sfx2.0/video-to-audio/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=mirelo-ai/sfx2.0/video-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
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
