[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Eleven Music v2.5](https://spiral.ai/integrations/opencode/eleven-music-v2-5)

# How to Use Eleven Music v2.5 in opencode

Eleven Music v2.5 creates vocal songs and instrumental scores from written briefs or section-by-section plans. Compared with Eleven Music v2, it improves audio quality and how closely the music follows your instructions.

|  |  |
| --- | --- |
| Model | Eleven Music v2.5 |
| Available through | ElevenLabs |
| Category | Audio |
| Price | Up to $1.95 per run at the default inputs. |
| Returns | audio |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Eleven Music v2.5 in opencode

- Read the game's forest scene notes and use Eleven Music v2.5 to create a 60-second instrumental exploration cue. Use ambient folk, wooden flute, soft strings, a slow pulse, and a quiet contemporary production style. Save it with the audio assets.
- Use Eleven Music v2.5 to create a 30-second instrumental score for the product demo described in the project README. Request modern electronic music at 100 BPM with soft synthesizers, light percussion, and a restrained mood.
- Read the trailer timing notes and use Eleven Music v2.5 with a composition plan for a 45-second orchestral cue: 15 seconds of low-string tension, 20 seconds of brass and percussion, then 10 seconds of quiet resolution.
- Use Eleven Music v2.5 to create a 15-second instrumental podcast intro for the show described in the content folder. Request warm 1970s soul, electric piano, brushed drums, and an 85 BPM pulse. Save the audio beside the episode assets.
- Read the original lyrics in the project and use Eleven Music v2.5 to make a 90-second English indie-pop demo. Build an intro, verse, chorus, and outro with acoustic guitar, bass, light drums, and intimate vocals.

## How to set up Eleven Music v2.5 in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Eleven Music v2.5**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "elevenlabs",
    "model": "music_v2_5",
    "input": {
      "seed": 0
    }
  }'
```

Then paste one of the prompts above: opencode finds Eleven Music v2.5 on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## Eleven Music v2.5 tools and prices

- [Eleven Music v2.5](https://spiral.ai/tools/elevenlabs/music_v2_5) (ElevenLabs): Up to $1.95 per run at the default inputs.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed | 0 to 2147483647 | — | Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt. |
| prompt |  | — | A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. |
| finetune_id |  | — | The ID of the finetune to use for the generation |
| lyrics_text |  | — | The lyrics text to use for the generation. |
| music_prompt |  | — | A music prompt. Deprecated. Use `composition_plan` instead. |
| output_format | auto, mp3_48000_128, mp3_48000_192, mp3_48000_240, mp3_48000_320, mp3_22050_32, mp3_24000_48, mp3_44100_32, mp3_44100_64, mp3_44100_96, mp3_44100_128, mp3_44100_192, pcm_8000, pcm_16000, pcm_22050, pcm_24000, pcm_32000, pcm_44100, pcm_48000, ulaw_8000, alaw_8000, opus_48000_32, opus_48000_64, opus_48000_96, opus_48000_128, opus_48000_192 | auto | Output format of the generated audio. Formatted as codec_sample_rate_bitrate. Use "auto" (the default) to let the API pick the best format for the selected model: mp3_44100_128 for v1 models and mp3_48000_192 for v2 models. |

## What can you do with Eleven Music v2.5 in opencode?

Create music assets for the game, demo, or media project you are building. Turn project notes into a musical brief or timed composition plan, then save the generated audio with the project's other assets.

### Podcast intros and outros

Create short instrumental openings and closing themes with a defined mood, instrument palette, and duration.

### Product demonstration music

Generate a restrained instrumental bed for a narrated demonstration, with sparse instrumentation during the explanation.

### Game scene scores

Describe the setting and emotional arc to create exploration, suspense, or battle music.

### Advertisement soundtracks

Commission a short score with an opening hook, quieter middle, and closing musical phrase.

### Songs in different languages

Create separate vocal tracks in English, Spanish, German, or Japanese with a clearly specified genre and mood.

### Short film cues

Plan a score around a scene's progression, such as tension, climax, and resolution.

### Songwriting demos

Explore an arrangement through an intro, verse, chorus, and outro before committing to a musical direction.

### Ambient listening tracks

Request instrumental ambient music with a defined texture, pace, and length for a quiet listening session.

## Overview

- [ElevenLabs](https://spiral.ai/providers/elevenlabs)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## Eleven Music v2.5 in other agents

- [Amp](https://spiral.ai/integrations/amp/eleven-music-v2-5)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/eleven-music-v2-5)
- [Claude](https://spiral.ai/integrations/claude-desktop/eleven-music-v2-5)
- [Claude Code](https://spiral.ai/integrations/claude-code/eleven-music-v2-5)
- [Cline](https://spiral.ai/integrations/cline/eleven-music-v2-5)
- [Codex](https://spiral.ai/integrations/codex/eleven-music-v2-5)
- [Cursor](https://spiral.ai/integrations/cursor/eleven-music-v2-5)
- [Devin](https://spiral.ai/integrations/devin/eleven-music-v2-5)
- [dots](https://spiral.ai/integrations/dots/eleven-music-v2-5)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/eleven-music-v2-5)
- [Gemini](https://spiral.ai/integrations/gemini/eleven-music-v2-5)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/eleven-music-v2-5)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/eleven-music-v2-5)
- [goose](https://spiral.ai/integrations/goose/eleven-music-v2-5)
- [Grok](https://spiral.ai/integrations/grok/eleven-music-v2-5)
- [Grok Build](https://spiral.ai/integrations/grok-build/eleven-music-v2-5)
- [Hermes](https://spiral.ai/integrations/hermes/eleven-music-v2-5)
- [Instinct](https://spiral.ai/integrations/instinct/eleven-music-v2-5)
- [Manus](https://spiral.ai/integrations/manus/eleven-music-v2-5)
- [Muse](https://spiral.ai/integrations/muse/eleven-music-v2-5)
- [Muse Code](https://spiral.ai/integrations/muse-code/eleven-music-v2-5)
- [n8n](https://spiral.ai/integrations/n8n/eleven-music-v2-5)
- [Notion](https://spiral.ai/integrations/notion/eleven-music-v2-5)
- [OpenClaw](https://spiral.ai/integrations/openclaw/eleven-music-v2-5)
- [Perplexity](https://spiral.ai/integrations/perplexity/eleven-music-v2-5)
- [Raycast](https://spiral.ai/integrations/raycast/eleven-music-v2-5)
- [VS Code](https://spiral.ai/integrations/vscode/eleven-music-v2-5)
- [Windsurf](https://spiral.ai/integrations/windsurf/eleven-music-v2-5)
- [Zapier](https://spiral.ai/integrations/zapier/eleven-music-v2-5)

## More opencode guides

- [Eleven Music v2](https://spiral.ai/integrations/opencode/eleven-music-v2)
- [Eleven Music with metadata](https://spiral.ai/integrations/opencode/eleven-music-with-metadata)
- [Eleven Music](https://spiral.ai/integrations/opencode/eleven-music)
- [Eleven Sound Effects v3](https://spiral.ai/integrations/opencode/eleven-sound-effects-v3)
- [Eleven Multilingual v2](https://spiral.ai/integrations/opencode/eleven-multilingual-v2)
- [Eleven Turbo v2](https://spiral.ai/integrations/opencode/eleven-turbo-v2)

## Questions about Eleven Music v2.5 in opencode

**Can opencode use Eleven Music v2.5?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Eleven Music v2.5 like any built-in tool.

**How much does Eleven Music v2.5 cost in opencode?**

Up to $1.95 per run at the default inputs. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an ElevenLabs account to use Eleven Music v2.5 in opencode?**

No. Spiral runs Eleven Music v2.5 on its own ElevenLabs account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Eleven Music v2.5 in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while Eleven Music v2.5 runs?**

Eleven Music v2.5 runs in the background. opencode starts the run, checks on it and gives you the audio when it's ready.

**Can Eleven Music v2.5 create songs and instrumental tracks?**

Yes. It can create songs with lyrics and vocals or instrumental scores. For background music, explicitly request instrumental only to discourage unwanted singing.

**How long can an Eleven Music v2.5 track be?**

The music API accepts requested lengths from 3 seconds to 10 minutes. Set a length that matches the scene, segment, or song you need.

**Which languages can Eleven Music v2.5 sing in?**

Documented examples include English, Spanish, German, and Japanese. State the desired vocal language in your brief.

**How should I describe the music I want?**

Specify genre, mood, instruments, tempo, and production era. For example, request relaxed 1970s soul with electric piano, brushed drums, and an 80 BPM pulse.

**How can I control when sections and lyrics happen?**

Use a composition plan when section structure and lyric timing matter. Give each section its own musical direction instead of putting the entire arrangement into one broad description.

