How to Use Eleven Music in Muse Code
Eleven Music turns written briefs into songs with vocals or instrumental scores for videos, podcasts, and games. Use composition plans for arrangements that need specific sections and lyric timing.
Prompts to try with Eleven Music in Muse Code
Copy an example into Muse Code, or ask in your own words.
Read the game's scene descriptions and use Eleven Music to generate a 60-second instrumental exploration cue: subdued fantasy folk, 80 BPM, acoustic guitar, flute, and soft strings. Save it with the game's audio assets.
Read the product demo script and use Eleven Music to create a 45-second instrumental backing track: warm electronic pop, 100 BPM, soft synth chords, muted bass, and light percussion. Keep the arrangement sparse.
Use the podcast brief in this project to generate a 15-second opening with Eleven Music: instrumental jazz, 110 BPM, upright bass, brushed drums, and piano, with a relaxed late-night mood.
Read the trailer shot list and create a composition plan for a 60-second instrumental score with Eleven Music. Divide it into a 15-second quiet opening, a 30-second build, and a 15-second finale using strings and percussion.
Read the project's Spanish campaign copy and write a short original chorus based on its message. Use Eleven Music to generate a 30-second Spanish-language acoustic pop song with clear vocals, guitar, and light percussion.
How to set up Eleven Music in Muse Code
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Install Muse Code
curl -fsSL https://dev.meta.ai/install.sh | bash
- Ask Muse to add the server
Start muse and ask:
Add the Spiral MCP server at https://api.spiral.ai/mcp
- Sign in
In your terminal, run:
muse mcp login spiral
Use the Spiral skill
- Send Muse Code this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Eleven Music
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "fal", "model": "fal-ai/elevenlabs/music", "input": { "prompt": "Mysterious original soundtrack, themes of jungle, rainforest, nature, woodwinds, busy rhythmic tribal percussion." } }'
Then paste one of the prompts above: Muse Code finds Eleven Music on Spiral, shows the price and runs it.
Eleven Music providers and prices
Spiral runs Eleven Music through fal. Open a card for today's price, with every fee included.
$0.78 per minute. Billed on music_length_ms, default 600,000, rounded up to the next minute.
Settings you can ask for
Eleven Music works from your prompt. Ask Muse Code for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Music length ms | 3000 to 600000 | The length of the song to generate in milliseconds. Used only in conjunction with prompt. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. | |
| Force instrumental | on or off | off | If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the prompt. Can only be used with prompt. |
| Respect sections durations | on or off | on | Controls how strictly section durations in the composition_plan are enforced. It will only have an effect if it is used with composition_plan. When set to true, the model will precisely respect each section's duration_ms from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. |
| Output format | mp3_22050_32, mp3_44100_32, mp3_44100_64, mp3_44100_96, mp3_44100_128, mp3_44100_192, pcm_8000, pcm_16000 and 11 more | mp3_44100_128 | Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. |
Every API field of Elevenlabs Music is on its tool page: open its card above.
What can you do with Eleven Music in Muse Code?
Create music assets that match a project's scenes, scripts, and running times. A coding agent can turn those files into briefs for Eleven Music and organize the resulting cues alongside the project.
Podcast opening music
Create a short instrumental opening with a clear musical identity, such as brushed drums, upright bass, and a restrained piano melody.
Product demonstration soundtracks
Generate a 60-second instrumental cue with a steady tempo and sparse instrumentation for a narrated product demonstration.
Short ad music
Compose a 30-second track around an ad's mood, instruments, and intended audience, with a quieter opening and a stronger finish.
Game scene cues
Describe a game's setting and emotional tone to create music for exploration, a tense encounter, or a victory scene.
Songs in different languages
Develop original vocal songs in English, Spanish, German, or Japanese, with a stated genre and vocal direction.
Film scene score drafts
Explore how piano, strings, or electronic instrumentation changes the mood of a scene before choosing a scoring direction.
Music for social videos
Create a 15-second musical cue around a video's mood, with a specific tempo and a small set of instruments.
Song arrangement sketches
Use a composition plan to explore an introduction, verse, chorus, and ending with deliberate section lengths.
More on Eleven Music and Muse Code
Overview
Eleven Music in other agents
Questions about Eleven Music in Muse Code
Can Muse Code use Eleven Music?
Yes. Add Spiral to Muse Code as an MCP server, and Muse Code can find and run Eleven Music like any built-in tool.
How much does Eleven Music cost in Muse Code?
$0.78 per 60,000 seconds. Billed on `music_length_ms`, default 600,000. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Muse Code plan is separate.
Do I need a fal account to use Eleven Music in Muse Code?
No. Spiral runs Eleven Music on its own fal account. You sign in to Spiral once and never paste a key.
How long does it take to set up Eleven Music in Muse Code?
About two minutes: install Muse Code, then ask Muse to add the server, then sign in.
Does Muse Code wait while Eleven Music runs?
Eleven Music runs in the background. Muse Code starts the run, checks on it and gives you the audio when it's ready.
What is Eleven Music useful for?
Use it for original songs, instrumental scores, and music shaped around a scene or mood. Practical starting points include video soundtracks, ad music, and game cues.
How long can an Eleven Music track be?
For generation from a text prompt, the documented range is 3 seconds to 10 minutes. Choose a length that matches the intended cue.
Which languages can Eleven Music sing in?
Documented examples include English, Spanish, German, and Japanese. State the vocal language explicitly in your brief.
What should I include in a music prompt?
Specify genre, mood, instruments, tempo, and production era. Add the scene or purpose so the musical choices serve the project.
Can I request a specific tempo and key?
Yes. ElevenLabs reports that BPM instructions are followed accurately, while the intended key is captured often; check the result before combining it with an existing recording.
Start using Eleven Music in Muse Code
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Muse Code:
set up https://spiral.ai/SKILL.md


