Back to pipelines

Music Generator

Generate original background music that matches any mood, genre, and length you describe. Royalty-free, ready in seconds.

2.5

Be specific: instrumentation, tempo, tension, genre references.

Quick start

Track length in seconds.

Still needed: Mood / Genre, Duration

Runs on

API

Examples

Audio

Pyra's Violet Wings: her theme

ElevenLabs Music. Pyra's own theme: a dreamy, instrumental orchestral-electronic score written from one prompt, melodic and structured, ready to sit under any clip.

Best for

  • Background scores for documentaries, podcasts, and videos
  • Mood-setting ambient music, cinematic underscore, lo-fi, orchestral
  • Genre-specific tracks anchored to a reference style (EDM, trailer, corporate uplifting)

Tips

  • Be specific about mood: 'dark cinematic orchestral, slow tension build, suspenseful atmosphere' not 'dramatic'
  • Request duration ~10% longer than video to ensure full coverage
  • For background scores: request instrumental only, no vocals

Recipes using this pipeline

Articles about this pipeline

Music Generator API

Call this pipeline from your own code. One request dispatches a run; the model is an input field, not a separate endpoint.

4 inputs
2 required
2.5 to 45.1 credits
bun add @pipe2-ai/sdk
import { createClient } from "@pipe2-ai/sdk";

const client = createClient(process.env.PIPE2_TOKEN!);

const { run_pipeline } = await client.RunPipeline({
  pipeline_slug: "music-generator",
  input: {
    prompt: "Warm lo-fi beat with a soft rhodes piano, relaxed and unhurried",
    duration_sec: 60,
    model: "eleven-music-v1",
  },
});
pip install pipe2
import asyncio
import os

from pipe2 import Pipe2Client

client = Pipe2Client(token=os.environ["PIPE2_TOKEN"])

run = asyncio.run(client.run_pipeline(
    pipeline_slug="music-generator",
    input={
        "prompt": "Warm lo-fi beat with a soft rhodes piano, relaxed and unhurried",
        "duration_sec": 60,
        "model": "eleven-music-v1",
    },
))
go get github.com/pipe2-ai/sdk-go
client := pipe2.NewClient(os.Getenv("PIPE2_TOKEN"))

input := json.RawMessage(`{
  "prompt": "Warm lo-fi beat with a soft rhodes piano, relaxed and unhurried",
  "duration_sec": 60,
  "model": "eleven-music-v1"
}`)

run, err := pipe2.RunPipeline(context.Background(), client, "music-generator", input)
if err != nil {
    log.Fatal(err)
}
brew install pipe2-ai/tap/pipe2
pipe2 pipelines run \
  --pipeline music-generator \
  --input-json '{"prompt": "Warm lo-fi beat with a soft rhodes piano, relaxed and unhurried", "duration_sec": 60, "model": "eleven-music-v1"}' \
  --wait

Get an API token →

Parameters

duration_sec required

Track length in seconds.

integer default 60
prompt required

Be specific: instrumentation, tempo, tension, genre references.

string
model

Music engine to use. Leave unset to let Pipe2 choose.

autoeleven-music-v1lyria-3-pro default auto
Show all 4 inputs
vocals

Vocals carry genre identity (K-pop, pop, hip-hop). Leave on for typical music; turn off only for instrumental beds under narration.

boolean default true

Use it from an AI agent

Point any MCP client at pipe2 and your agent gets these tools. It finds this pipeline, reads the same schema above, then runs it.

  • list_pipelines
  • get_pipeline_schema
  • run_pipeline
  • get_pipeline_run_status
  • request_upload
https://mcp.pipe2.ai/mcp
{
  "mcpServers": {
    "pipe2ai": {
      "url": "https://mcp.pipe2.ai/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}

Full API reference MCP setup CLI reference

AI Music Generator

Describe the mood, genre, or feeling and get a royalty-free MP3 track ready to drop into your video. Instrumental by default for clean voiceover beds, with a vocals toggle when you want a sung track.

What you can make

  • Background scores for videos: instrumental beds that sit under narration
  • Intros and outros: short stingers for podcasts, YouTube, social
  • Mood pieces: cinematic underscore, lo-fi, ambient, orchestral
  • Genre-specific tracks: cite a reference style and the model matches it

How it works

  1. Describe the music: instrumentation, tempo, tension, emotional arc, genre reference
  2. Pick a duration: anywhere from 10 seconds to 10 minutes (some models cap at 3 minutes)
  3. Toggle vocals: off for instrumental beds, on for sung tracks
  4. Generate: download the MP3 or chain it into Video Reel as a background track

Prompt tips

  • Name specific instruments, "solo cello", "acoustic guitar and piano", "full orchestral strings"
  • Describe arc, "build from quiet to full in the last 30 seconds"
  • Reference styles, "Hans Zimmer-style cinematic", "lo-fi hip-hop", "uplifting corporate"
  • State the use, "cinematic underscore", "YouTube intro", "background for narration"

Frequently Asked Questions

What audio format is the output?
High-quality MP3, ready to drop into any video editor or browser. Files land in your asset library for immediate use in the Video Reel pipeline.
How long can the track be?
From 10 seconds up to 10 minutes, the default model covers the full range, and some models cap at 3 minutes. Pick the exact duration on the slider, there are no preset slots.
Are tracks instrumental or do they have vocals?
Vocals are on by default because they carry genre identity and make a track feel finished. Turn vocals off for instrumental beds under narration, where singing would compete with the speaking voice.
Can I use generated music commercially?
Yes. All generated music is cleared for commercial use. Check the usage policies for platform-specific restrictions.
How specific should my prompt be?
Very. Instead of 'happy music', try 'upbeat acoustic guitar with light percussion, 120 BPM, summer road trip feeling'. Naming instruments, tempo, and emotional arc produces much better results.

Explore more pipelines

See all →
Video Generator
from 9.5
Video Generator
Image Generator
0.2-6.4
Image Generator
Audio Generator
0.7-1.3
Audio Generator
Video Editor
13.1-29.8
Video Editor