Skip to main content

Introduction to ElevenLabs Music Generation

Welcome to the ElevenLabs Music Generation service documentation! ElevenLabs provides AI-powered music generation with fine-grained control through structured composition plans, video scoring capabilities, and professional stem separation.

Supported Models

ModelDescription
music_v1ElevenLabs flagship music generation model

Features

Music Generation

Generate music from simple text prompts or detailed composition plans with section-level control

Composition Plan

AI-generated structured plans with sections, styles, and lyrics — free, no credits consumed

Video to Music

Automatically generate background music that matches your video content

Stem Separation

Split audio into 2 tracks (vocals + instrumental) or 6 individual stems

How to Use ElevenLabs

1

Choose your input method

Use a simple prompt for quick generation, or create a compositionPlan via /eleven/plan for fine-grained control over sections, styles, and lyrics.
2

Generate music

Call POST /eleven/music with your prompt or composition plan. You’ll receive a taskId.
3

Poll for results

Use GET /eleven/tasks?taskId=xxx to poll until status is completed. The result contains the generated audio data.

Quick Example

curl -X POST "https://api.mountsea.ai/eleven/music" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A melancholic indie folk song with acoustic guitar and soft vocals",
    "model": "music_v1",
    "musicLengthMs": 180000
  }'

Available Endpoints

EndpointMethodDescription
/eleven/musicPOSTGenerate music from prompt or composition plan
/eleven/planPOSTCreate a composition plan (free, no credits)
/eleven/video-to-musicPOSTGenerate background music from video
/eleven/tasksGETQuery task status and results
/eleven/stemsPOSTSeparate audio into stems
/eleven/uploadPOSTUpload audio for Inpainting (enterprise)

Two Input Modes

ElevenLabs supports two mutually exclusive input methods for music generation:

1. Simple Prompt Mode

Provide a text prompt describing the desired music. Quick and easy — the AI handles all the details.
{
  "prompt": "A melancholic indie folk song with acoustic guitar",
  "model": "music_v1",
  "musicLengthMs": 180000
}

2. Composition Plan Mode

Use a structured compositionPlan with per-section control over styles, duration, and lyrics. Generate plans automatically via /eleven/plan, then customize before generating.
{
  "compositionPlan": {
    "positive_global_styles": ["epic orchestral", "cinematic"],
    "negative_global_styles": ["lo-fi"],
    "sections": [
      {
        "section_name": "Intro",
        "positive_local_styles": ["soft piano", "building tension"],
        "duration_ms": 15000
      },
      {
        "section_name": "Verse",
        "positive_local_styles": ["warm vocals", "acoustic guitar"],
        "duration_ms": 30000,
        "lines": ["Walking through the golden fields", "Sunlight on my face"]
      }
    ]
  },
  "model": "music_v1",
  "musicLengthMs": 180000
}
Use /eleven/plan first to generate a composition plan from a simple prompt, then review and customize sections before passing it to /eleven/music. The plan endpoint is free and doesn’t consume credits.

Output Formats

ElevenLabs supports multiple output formats via the outputFormat parameter:
FormatDescription
mp3_44100_128MP3 44.1kHz 128kbps (default)
mp3_44100_192MP3 44.1kHz 192kbps (Creator+ required)
pcm_44100PCM 44.1kHz uncompressed (Pro+ required)
opus_48000_128Opus 48kHz 128kbps
See the full list of supported formats in the Music Generation endpoint documentation.

Explore the API Documentation