/elevenlabs:musicfrom elevenlabs
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.
Ships in elevenlabs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
from 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)
import { 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"));
curl -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.video_to_music | Generate background music from one or more uploaded video files |
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.
Generate background music from uploaded video clips via
POST /v1/music/video-to-music
(client.music.video_to_music). This is separate from prompt-based
music.compose (POST /v1/music).
The API combines videos in order, accepts an optional natural-language description, and lets you
steer style with up to 10 tags such as upbeat or cinematic. Use model_id on this endpoint
only (defaults to music_v1).
from elevenlabs import ElevenLabs
client = ElevenLabs()
audio = client.music.video_to_music(
videos=["trailer.mp4"],
description="Build suspense, then resolve with a warm cinematic finish.",
tags=["cinematic", "suspenseful", "uplifting"],
model_id="music_v1",
)
with open("video-score.mp3", "wb") as f:
for chunk in audio:
f.write(chunk)
curl -X POST "https://api.elevenlabs.io/v1/music/video-to-music" \
-H "xi-api-key: $ELEVENLABS_API_KEY" \
-F "[email protected]" \
-F "description=Build suspense, then resolve with a warm cinematic finish." \
-F "tags=cinematic" \
-F "tags=suspenseful" \
-F "tags=uplifting" \
-F "model_id=music_v1" \
--output video-score.mp3
Constraints from the current API schema:
description for high-level musical direction and tags for concise style cuesFor granular control, generate a composition plan first, modify it, then compose:
plan = 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_suggestiontry:
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).
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub joaquincampo/my-plugins --plugin elevenlabs18 skills in this plugin
/adminUse for ElevenLabs account and workspace administration. Covers billing, pay as you go, credits, data residency, usage analytics, workspaces, members, seats, billing groups, service accounts, API keys, SSO and SAML and SCIM, resource sharing, and user groups./agentsBuild voice AI agents with ElevenLabs. Use when creating voice assistants, customer service bots, interactive voice characters, or any real-time voice conversation experience./docs-lookupCatch-all for any ElevenLabs question not covered by a more specific skill. Use for API endpoint reference lookups, forced alignment, models and pricing pages, changelog, or any new ElevenLabs product. Finds the right documentation page and fetches it as clean markdown./dubbingUse when building dubbing or audio and video translation features with ElevenLabs. Covers automated dubbing, Dubbing Studio fine-grained control, human-edited dubbing via Productions, and the dubbing API endpoints./image-videoUse when generating or editing images and videos with ElevenLabs, including avatars (talking-head videos with synchronized lip movement). Covers image and video generation from text prompts and visual references./reception-aiUse when working with ElevenLabs Reception AI, the AI phone receptionist product. Covers setup, configuration, phone numbers, call handling, and the Reception AI APIs.