# Mirelo SFX 2.0 Text to Audio API

> Mirelo SFX 2.0 generates sound effects and ambience from a text description, up to 600 seconds long. A negative prompt keeps unwanted sounds such as music or voices out of the result.

Source: https://www.sandbase.ai/models/mirelo/sfx2.0/text-to-audio
API reference: https://www.sandbase.ai/models/mirelo/sfx2.0/text-to-audio#api

## Facts

- Provider: Mirelo
- Type: Audio model
- Model ID: `mirelo/sfx2.0/text-to-audio`
- Price: From $0.60 per run
- Capabilities: text to audio
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "mirelo/sfx2.0/text-to-audio",
  "prompt": "Heavy rain on a metal roof with distant thunder",
  "duration": 30,
  "output_format": "wav",
  "negative_prompt": "music, voices"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Mirelo SFX 2.0 Text to Audio through SandBase?

Create a SandBase API key, then send requests with the model ID "mirelo/sfx2.0/text-to-audio" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Mirelo account?

No. One SandBase API key and balance gives you access to Mirelo SFX 2.0 Text to Audio and the other models in the catalog; you do not need to sign up with Mirelo separately.

## README

### Mirelo SFX 2.0 Text to Audio

Mirelo SFX 2.0 generates sound effects and ambience from text, from 0.1 to 600 seconds long.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Sound to generate, up to 2,000 characters. |
| `duration` | number 0.1–600 | 30 | Length in seconds; sets the price. |
| `negative_prompt` | string | — | Sounds to keep out. |
| `output_format` | `wav` / `mp3` / `aac` / `flac` | `wav` | Output file format. |
| `seed` | integer | random | Fix it to compare prompt changes. |

#### Billing

$0.02 per second of requested audio, one file per request.

| Length | Price |
|---|---|
| 5 s | $0.10 |
| 30 s (default) | $0.60 |
| 120 s | $2.40 |

Failed runs are not charged.

#### Prompting

- Name the sound source, material, space and how it changes over time.
- Use `negative_prompt` to keep out music or voices.

#### Also on SandBase

Related: `mirelo/sfx2.0/video-to-audio`.
