Spiral gives your agent every tool with one account. Browse the tools →

opencode · AudioReleased 2026-09-14

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.

Prompts to try with Eleven Music v2.5 in opencode

Copy an example into opencode, or ask in your own words.

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.

Eleven Music v2.5opencode
Try asking
  • 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.

    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.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    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.

    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.

    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.

Eleven Music v2.5 providers and prices

Spiral runs Eleven Music v2.5 through ElevenLabs. Open a card for today's price, with every fee included.

ElevenLabsAudio

Settings you can ask for

Eleven Music v2.5 works from your prompt and lyrics text. Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Seed0 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.

Output formatauto, mp3_48000_128, mp3_48000_192, mp3_48000_240, mp3_48000_320, mp3_22050_32, mp3_24000_48, mp3_44100_32 and 18 moreauto

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.

Sign with C2Paon or offoff

Whether to sign the generated song with C2PA. Applicable only for mp3 files.

MusicGenerationModetrack, loop, ambience, or video_to_music

Optional generation mode hint for prompt-based music generation. Can only be used with prompt.

Music length ms3000 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.

Finetune strengtha number up to 21

How strongly the finetune influences the generation. Defaults to 1.0 (full strength). Lower values soften the influence of the finetune, leaving more room for prompt-level steering. Only meaningful when finetune_id is also provided.

Force instrumentalon or offoff

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.

Use phonetic nameson or offoff

If true, proper names in the prompt will be phonetically spelled in the lyrics for better pronunciation by the music model. The original names will be restored in word timestamps.

Store for inpaintingon or offoff

Whether to store the generated song for inpainting.

Respect sections durationson or offon

Controls how strictly section durations in the composition_plan are enforced. Only used with composition_plan and only applies to music_v1; for music_v2 and music_v2_5 section durations are always enforced and this is ignored. When false for music_v1, the model may adjust individual section durations for better quality and latency, while preserving the total song duration from the plan.

Every API field of Eleven Music v2.5 is on its tool page: open its card above.

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.

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.

Get started

Start using Eleven Music v2.5 in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options