---
name: sona
description: Make sound effects, loops, music, voice, dialogue and remixes, replace part of a clip, split stems, clean up or re-voice a recording, or add sound to a video with Sona's generative audio models through the Sona MCP server or API. Use when the user asks for audio files (SFX, ambience, music beds, stingers, loops, voice lines, stems) for a game, video, podcast or app.
---

# Using Sona

Sona renders audio from text with a catalog of models, paid with the user's Sona
tokens. Connect the MCP server at `https://sona.audio/api/mcp` with the header
`Authorization: Bearer sona_live_…` (the user creates a key in Sona: Account →
Developers). Without MCP, the same steps work on the HTTP API
(`https://sona.audio/api/v1`, OpenAPI at `/api/v1/openapi.json`).

Never print, log or commit the API key.

## 1. Choose a category, not a model

Call `list_models` once. Its description lists the categories, the values each
takes and the default model. Pass `category` to `generate_audio` and Sona uses
its best model. Pick a specific `model` only when the user names one or needs a
value only that model supports (check it with `get_model`).

- One-shot sounds, foley, UI sounds, impacts, ambience, sound for a video: `sound-effects`.
- Songs, music beds, stingers, loops, a score for a video: `music` (`bpm` for loops).
- Spoken lines, voice change, a scene with several speakers: `voice`.
- Working on an existing file (remix, extend, replace a part, stems, clean up): `remix-edit`.

The category ids and their models come from `list_models`; older ids still work
as aliases. A category's default model is a general one: for a module below,
pick a model that has the values the module needs (`get_model` shows them).

## Modules: same tools, different values

| Module | Send in `values` | Prompt |
|---|---|---|
| Remix | `reference_audio`, `change` (0 to 1) | yes |
| Extend | `reference_audio`, `duration` (how much to add) | yes |
| Replace | `reference_audio`, `region: [start, end]` in seconds | yes: what goes in the region |
| Stems | `reference_audio` | no; the result lists every part in `output.files` |
| Clean Up | `reference_audio` | no |
| Voice Change | `reference_audio` (voice in `extras`) | no |
| Dialogue | `script`: one `Name: line` per turn (voices per name in `extras.speaker_voices`) | no |
| From Video | `reference_video` (public mp4/mov URL) | optional: off-screen sounds, mood |
| Speech | `prompt` is the text to say (voice in `extras`) | yes |

Input files must be public http(s) URLs. Use only audio and voices the user has
the rights to.

## 2. Write a good prompt

Be concrete: the source, the action, the material, the space, the distance.

- Weak: `door`
- Strong: `heavy wooden door creaks open slowly in a stone hall, distant echo`
- Music: genre, mood, instruments, tempo and structure, e.g. `warm lo-fi hip hop beat, dusty vinyl drums, mellow Rhodes chords, 80 bpm, no vocals`.

Set `duration` in seconds (short for SFX: 1 to 6 s). Use `negative` for what to
avoid. Make one sound per render: split "door, then footsteps" into two renders.

## 3. Check the cost before spending

Every request can be priced first: `estimate_cost` (MCP) or `"dry_run": true` (API).

Renders cost tokens, charged when they start; a failed or cancelled render is
refunded. For more than one render, call `estimate_cost` for each (or one and
multiply), tell the user the total and the balance (`get_balance`), and wait for
a yes when the total is large. On `insufficient_tokens`, stop and tell the user
to buy a token pack in Sona.

## 4. Render and wait

`generate_audio` returns at once with an `id`. Give each intended render a
unique `idempotency_key` and reuse it if you retry, so it is never charged
twice. Then call `wait_for_generation` with the id; if it returns `done: false`,
call it again. Keep at most 4 renders in flight. On `rate_limited`, wait the
seconds the error says.

## 5. Download right away

A completed render has `download.url` and `download.file_name` (a stems render
also lists each part in `generation.output.files`: download them all). The URL expires
about 1 hour after the render started and Sona keeps no copy: download it
immediately, e.g.

```sh
curl -sfL "$URL" -o "audio/$FILE_NAME"
```

Tell the user where each file was saved and what it cost. If a render failed,
say so (its tokens were refunded) and offer to retry with a clearer prompt.
