music
Installation
SKILL.md
ElevenLabs Music Generation
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.
All examples below default to music_v2, the current generation model. Pass model_id="music_v1" only when explicitly requested to.
Workspace BGM Workflow
For video background music in this workspace:
- Read Generated Music Registry before calling the API. Search by use case, mood, BPM, tags, and prompt. Audition and reuse a suitable recorded audio file when available. Reusing a prompt alone still triggers a paid generation; reuse its linked audio file to avoid spending credits.
- Generate only when the registry has no suitable track. Keep new BGM requests at or below 30 seconds unless the user explicitly requests otherwise. Prefer 10–20 seconds for reusable loops.
- For narration BGM, use
force_instrumental=trueand prompt for stable density, restrained melody, no intro or ending, no fade, no build or breakdown, and an ending that connects to the beginning. Specify BPM and a whole-bar duration when practical. - Preserve the exact API response as an immutable
*-raw.*file. Never overwrite, trim, normalize, or re-encode it. Create loop masters, mix versions, and previews as separate derived files. Prefer a lossless 48 kHz WAV loop master. - Fix an otherwise suitable seam locally with a short circular crossfade instead of paying for another generation. Make a repeated preview to verify the seam before approving the loop.
- After every successful generation, append an entry to Generated Music Registry before handoff. Record the exact prompt verbatim, date, project/use case, model, request duration, output format, instrumental setting, raw and derived file paths, measured durations, SHA-256 hashes, tags, approval status, and processing notes. Use workspace-relative paths and never record API keys.