Skip to content
Dashboard
Tiles

6. Audio Generation ​

Generate voiceovers, music, or sound effects from text prompts and optional voice references.

Audio Generation creates new audio assets. Use voiceover mode for spoken narration, music mode for background tracks, and sfx mode for sound effects.

How It Works ​

For voiceover, provide a script and optionally attach a voice reference. For music, describe the mood, genre, instrumentation, and target length. For sfx, describe the sound effect you want and optionally set a duration. The output can feed video-generation, AI Avatar, captions, or publishing workflows.

API Usage ​

Create an agent shell:

bash
curl -X POST "https://api.mosaic.so/agent/create" \
  -H "Authorization: Bearer mk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Launch voiceover",
    "visibility": "private"
  }'

Add an Audio Generation node:

bash
curl -X POST "https://api.mosaic.so/agent/AGENT_ID/update" \
  -H "Authorization: Bearer mk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "operations": [
      {
        "op": "create_node",
        "node_type_id": "14687f30-5fd0-468f-8239-2784d83df95b",
        "params_used": {
          "mode": "voiceover",
          "model": "eleven_v3",
          "script": "Introducing the fastest way to turn ideas into publish-ready videos.",
          "use_upstream_voice_reference": false
        }
      }
    ]
  }'

Run the agent with no video inputs:

bash
curl -X POST "https://api.mosaic.so/agent/AGENT_ID/run" \
  -H "Authorization: Bearer mk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "callback_url": "https://your-webhook.com/mosaic"
  }'

API Info ​

Node Params & API Details
  • Node ID: 14687f30-5fd0-468f-8239-2784d83df95b

Node params ​

ParamTypeRequiredDefaultNotes
mode"voiceover" | "music" | "sfx"No"voiceover"Audio generation mode.
model"eleven_v3" | "music"No"eleven_v3"Audio model for the selected mode.
scriptstringConditional""Required for voiceover mode.
voice_idstringNocurated defaultVoice ID when no upstream voice reference is used.
use_upstream_voice_referencebooleanNotrueUse selected upstream audio/video as a voice reference.
selected_context{audio:string[],videos:string[],voice_reference?:string}Noempty listsAttached references.
music_promptstringConditional""Required for music mode.
music_length_msnumberNo30000Music duration, 5-300 seconds.
sfx_promptstringConditional""Required for sfx mode.
sfx_length_secondsnumberNoautoSound effect duration in seconds, 0.5-30. Omit for automatic length.

Voiceover example ​

json
{
  "mode": "voiceover",
  "model": "eleven_v3",
  "script": "This is the voiceover text.",
  "use_upstream_voice_reference": false
}

Music example ​

json
{
  "mode": "music",
  "model": "music",
  "music_prompt": "Warm upbeat electronic background music for a product launch",
  "music_length_ms": 45000
}

Sound effects example ​

json
{
  "mode": "sfx",
  "sfx_prompt": "Short whoosh followed by a camera shutter click",
  "sfx_length_seconds": 3
}