Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate music using ElevenLabs Music API. Use when creating instrumental tracks, songs with lyrics, background music, jingles, or any AI-generated music composition. Supports prompt-based generation, composition plans for granular control, and detailed output with metadata.
.claude/skills/video-production-buddy-music/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -48% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -16% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 0% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 100% | 0% |
Generate music from text prompts - supports instrumental tracks, songs with lyrics, and fine-grained control via composition plans.
> Setup: See Installation Guide. For JavaScript, use @elevenlabs/* packages only.
pythonfrom elevenlabs import ElevenLabs client = ElevenLabs() audio = client.music.compose( prompt="A chill lo-fi hip hop beat with jazzy piano chords", music_length_ms=30000 ) with open("output.mp3", "wb") as f: for chunk in audio: f.write(chunk)
javascriptimport { ElevenLabsClient } from "@elevenlabs/elevenlabs-js"; import { createWriteStream } from "fs"; const client = new ElevenLabsClient(); const audio = await client.music.compose({ prompt: "A chill lo-fi hip hop beat with jazzy piano chords", musicLengthMs: 30000, }); audio.pipe(createWriteStream("output.mp3"));
bashcurl -X POST "https://api.elevenlabs.io/v1/music" \ -H "xi-api-key: $ELEVENLABS_API_KEY" -H "Content-Type: application/json" \ -d '{"prompt": "A chill lo-fi beat", "music_length_ms": 30000}' --output output.mp3
| Method | Description | |--------|-------------| | music.compose | Generate audio from a prompt or composition plan | | music.composition_plan.create | Generate a structured plan for fine-grained control | | music.compose_detailed | Generate audio + composition plan + metadata | | music.upload | Upload an audio file for later inpainting workflows and optionally extract its composition plan |
See API Reference for full parameter details.
music.upload is available to enterprise clients with access to the inpainting feature.
For granular control, generate a composition plan first, modify it, then compose:
pythonplan = client.music.composition_plan.create( prompt="An epic orchestral piece building to a climax", music_length_ms=60000 ) # Inspect/modify styles and sections print(plan.positiveGlobalStyles) # e.g. ["orchestral", "epic", "cinematic"] audio = client.music.compose( composition_plan=plan, music_length_ms=60000 )
bad_prompt errors include a prompt_suggestion with alternative phrasingbad_composition_plan errors include a composition_plan_suggestionpythontry: audio = client.music.compose(prompt="...", music_length_ms=30000) except Exception as e: print(f"API error: {e}")
Common errors: 401 (invalid key), 422 (invalid params), 429 (rate limit).
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-02 | fail→pass | 21,987 | 7,081 | -68% | 1 | 1 | 0% | 4,295 | 2,227 | -48% | 0 | 0 | — |
case-01 | fail→pass | 11,182 | 4,061 | -64% | 1 | 1 | 0% | 2,095 | 1,567 | -25% | 0 | 0 | — |
case-03 | fail→pass | 10,331 | 4,330 | -58% | 1 | 1 | 0% | 2,011 | 1,688 | -16% | 0 | 0 | — |
case-04 | fail→pass | 7,629 | 3,431 | -55% | 1 | 1 | 0% | 1,550 | 1,553 | +0% | 0 | 0 | — |
case-05 | fail→pass | 3,883 | 2,422 | -38% | 1 | 1 | 0% | 618 | 1,235 | +100% | 0 | 0 | — |
case-06 | fail→pass | 17,362 | 2,958 | -83% | 1 | 1 | 0% | 3,012 | 1,340 | -56% | 0 | 0 | — |
case-07 | fail→pass | 12,015 | 2,327 | -81% | 1 | 1 | 0% | 1,974 | 1,170 | -41% | 0 | 0 | — |
case-08 | fail→pass | 12,390 | 5,601 | -55% | 1 | 1 | 0% | 2,265 | 1,846 | -18% | 0 | 0 | — |
case-09 | fail→pass | 5,717 | 1,328 | -77% | 1 | 1 | 0% | 935 | 1,007 | +8% | 0 | 0 | — |
case-10 | fail→pass | 10,940 | 2,249 | -79% | 1 | 1 | 0% | 1,707 | 1,155 | -32% | 0 | 0 | — |
case-11 | fail→pass | 10,324 | 2,292 | -78% | 1 | 1 | 0% | 1,638 | 1,193 | -27% | 0 | 0 | — |
case-12 | fail→pass | 7,046 | 1,950 | -72% | 1 | 1 | 0% | 1,242 | 1,195 | -4% | 0 | 0 | — |
case-13 | pass→pass | 5,533 | 1,586 | -71% | 1 | 1 | 0% | 1,181 | 1,041 | -12% | 0 | 0 | — |
case-14 | pass→pass | 1,679 | 1,471 | -12% | 1 | 1 | 0% | 320 | 1,077 | +237% | 0 | 0 | — |
case-15 | fail→pass | 8,595 | 3,116 | -64% | 1 | 1 | 0% | 1,740 | 1,379 | -21% | 0 | 0 | — |
case-16 | pass→pass | 7,154 | 2,441 | -66% | 1 | 1 | 0% | 1,397 | 1,299 | -7% | 0 | 0 | — |
case-17 | fail→pass | 4,883 | 1,640 | -66% | 1 | 1 | 0% | 859 | 1,101 | +28% | 0 | 0 | — |
case-18 | fail→pass | 7,528 | 1,908 | -75% | 1 | 1 | 0% | 1,424 | 1,199 | -16% | 0 | 0 | — |
case-19 | pass→pass | 7,739 | 1,444 | -81% | 1 | 1 | 0% | 1,384 | 1,016 | -27% | 0 | 0 | — |
case-20 | pass→pass | 7,659 | 6,788 | -11% | 1 | 1 | 0% | 1,731 | 2,259 | +31% | 0 | 0 | — |
case-21 | pass→pass | 5,477 | 5,086 | -7% | 1 | 1 | 0% | 1,245 | 1,891 | +52% | 0 | 0 | — |
case-22 | fail→pass | 9,422 | 6,347 | -33% | 1 | 1 | 0% | 1,878 | 2,192 | +17% | 0 | 0 | — |
case-23 | pass→pass | 8,978 | 6,722 | -25% | 1 | 1 | 0% | 1,904 | 2,196 | +15% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +70 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.