Overview

Generate music
  • Output Type: audio
  • Base Model: musicgen
  • Estimated Cost: 0.5 * duration credits
  • Handler: replicate

Parameters

Required Parameters

prompt
string
required
Description of the type of music you want to generate.
Use stylistic and musical terms to precisely succinctly describe the music. No filler words, sentences, verbs, artist names, or negatives (“no drums”). Separate fields by pipe (|) in: Consider including genre or sub-genres, mood/emotional adjectives, instrumentats, production gloss (tape hiss, 2010s EDM polish, etc.), BPM + meter if not 4/4. Examples:
  • “Future Garage | Melancholic, Weightless | Skittering 2-step drums, Warm sub-bass, Hazy vinyl pads | Rain-soaked night-city reverb | 134 BPM”
  • “Orchestral | Spaghetti Western twang | Instrumentation Strings, Brass, Percussion, and Choir | Loungy, Subtle, Inspiring, Heroic | 90 BPM”,
  • “Electronic, Synthwave, Retro-Futuristic | Instruments: Analog Synths, Drum Machine, Bass | Moods: Nostalgic, Cool, Rhythmic | 1980s Sci-Fi | 115 BPM”
  • Label: Prompt

Optional Parameters

model
string
default:"melody-large"
Model to generate audio with
  • Label: Audio model
  • Options: stereo-melody-large, stereo-large, melody-large, large
duration
integer
default:10
Duration in seconds
  • Label: Duration
  • Minimum: 1
  • Maximum: 300
input_audio
string
An audio file that will influence the generated music.
  • Label: Input audio
continuation
boolean
default:false
If true, the generated music will be a continuation of the input_audio. Otherwise, the generated music will mimic the input_audio’s melody. Requires input_audio to be provided.
Only visible when input_audio
  • Label: Continue input_audio
temperature
float
default:1
Controls the ‘conservativeness’ of the sampling process. Higher temperature means more diversity.
  • Label: Temperature
  • Minimum: 0
  • Maximum: 1.0
classifier_free_guidance
float
default:3
Increases the influence of inputs on the output. Higher values produce lower-varience outputs that adhere more closely to inputs.
  • Label: Classifier free guidance
  • Minimum: 0
  • Maximum: 10
seed
integer
default:"random"
Set random seed for reproducibility. If blank, will be set to a random value.
  • Label: Seed
  • Minimum: 0
  • Maximum: 2147483647
output_format
string
default:"mp3"
Output audio format
  • Label: Output format
  • Options: mp3, wav