[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [Eleven Music with metadata](https://spiral.ai/integrations/codex/eleven-music-with-metadata)

# How to Use Eleven Music with metadata in Codex

Eleven Music with metadata creates vocal songs or instrumental scores for videos, podcasts, and games. It returns the composition plan and song metadata alongside the audio, making it useful when you need to inspect the arrangement or retain lyrics.

|  |  |
| --- | --- |
| Model | Eleven Music with metadata |
| Available through | ElevenLabs |
| Category | Audio |
| Price | $0.195 per minute of music. |
| Returns | audio, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Eleven Music with metadata in Codex

- Read the game's opening scene in this project. Use Eleven Music with metadata to create a 60-second instrumental exploration score with soft strings, sparse piano, and an uneasy mood; save the audio and returned metadata together.
- Use Eleven Music with metadata to make a 30-second instrumental cue for the project's demo video: muted guitar, light percussion, 100 BPM, contemporary production, and a quiet middle for narration.
- Inspect the game's victory screen. Use Eleven Music with metadata to create a 10-second instrumental brass-and-percussion cue that starts confidently and resolves with a clear final chord.
- Use Eleven Music with metadata to generate a 45-second English folk song about fixing a stubborn bug, with acoustic guitar and conversational vocals. Request word timestamps and build a caption preview from the returned lyrics and timing.
- Read the project's creative brief. Use Eleven Music with metadata to generate two 30-second instrumental directions, one acoustic and one electronic; save each track with its returned composition plan for comparison.

## How to set up Eleven Music with metadata in Codex

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

### Use Spiral's MCP server

1. **Add the hosted server**

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

2. **Sign in**: Codex opens the browser: sign in to Spiral and click Authorize. No API key. `codex mcp list` then shows Spiral.

```bash
codex mcp login spiral
```

### Use the Spiral skill

1. **Send Codex 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 with metadata**: 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-detailed",
    "input": {
      "seed": 0
    }
  }'
```

Then paste one of the prompts above: Codex finds Eleven Music with metadata on Spiral, shows the price and runs it.

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

## Eleven Music with metadata tools and prices

- [ElevenLabs Music · Song with Metadata](https://spiral.ai/tools/elevenlabs/music-detailed) (ElevenLabs): $0.195 per minute of music.

## 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 with metadata in Codex?

Create music that fits a game's scenes, a product demo, or another project asset. Use the returned composition plan and metadata to keep the audio tied to its creative brief.

### Podcast openings and endings

Create a short instrumental theme with a recognizable opening phrase and a clear ending for an episode.

### Product demo music

Request a restrained instrumental score that matches a demo's pacing, with fewer instruments during the spoken explanation.

### Game scene scores

Describe an exploration, encounter, or victory scene and request music with a matching mood and arrangement.

### Short advertisement soundtracks

Build a 30-second cue around an opening hook, a quieter middle, and a closing musical phrase.

### Multilingual song demos

Explore vocal songs in English, Spanish, German, or Japanese, retaining the returned lyrics and composition plan for review.

### Film scene scoring drafts

Describe a scene's emotional progression and request an instrumental arrangement that moves from tension to resolution.

### Music direction comparisons

Generate contrasting treatments of the same brief, such as acoustic folk and electronic pop, then compare the audio and returned plans.

### Lyric video preparation

Generate a vocal song and use its returned lyrics and word timestamps as starting material for timed captions.

## Overview

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

## Eleven Music with metadata in other agents

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

## More Codex guides

- [Eleven Music v2.5](https://spiral.ai/integrations/codex/eleven-music-v2-5)
- [Eleven Sound Effects v3](https://spiral.ai/integrations/codex/eleven-sound-effects-v3)
- [Eleven Music v2](https://spiral.ai/integrations/codex/eleven-music-v2)
- [Eleven Turbo v2](https://spiral.ai/integrations/codex/eleven-turbo-v2)
- [Eleven Music](https://spiral.ai/integrations/codex/eleven-music)
- [Eleven v3](https://spiral.ai/integrations/codex/eleven-v3)

## Questions about Eleven Music with metadata in Codex

**Can Codex use Eleven Music with metadata?**

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Eleven Music with metadata like any built-in tool.

**How much does Eleven Music with metadata cost in Codex?**

$0.195 per minute of music. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.

**Do I need an ElevenLabs account to use Eleven Music with metadata in Codex?**

No. Spiral runs Eleven Music with metadata 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 with metadata in Codex?**

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

**Does Codex wait while Eleven Music with metadata runs?**

Eleven Music with metadata runs in the background. Codex starts the run, checks on it and gives you the audio, json when it's ready.

**How long can Eleven Music tracks be?**

The detailed endpoint supports prompt-based tracks from 3 seconds to 10 minutes. Choose a duration that fits the intended cut before describing the arrangement.

**Can Eleven Music make instrumental music?**

Yes. Include instrumental only in the prompt, then describe the instruments, mood, and tempo you want.

**Which languages can Eleven Music sing in?**

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

**Can I specify a verse, chorus, and outro?**

Yes. Describe the sections in order and explain how the instrumentation or energy should change between them.

**Will repeated prompts keep exactly the same sound?**

Standard generations can vary in instrumentation, texture, production style, and feel. Keep those details explicit and review each result before using it across a series.

