Musicgen is a machine learning model that generates music based on a given prompt or melody. The model takes multiple parameters as input, like seed, top_k, top_p, prompt, duration, temperature, continuation, model_version, and normalization_strategy. These parameters can be used to manipulate the kind of music that will be generated, providing control over the style, duration and musical content. The output from the model is a URL link, where the generated music can be listened to in WAV format.

Use cases

The musicgen AI model, due to its ability to generate music from a prompt or melody, can find use in a variety of scenarios. First, movie producers can use it to score original music for their films. By simply inputting characteristics of the desired music, such as "triumphant and cinematic," it can generate a suitable background score, saving time and resources. This AI could be embedded in an app or software designed specifically for movie or theater production. Additionally, music teachers could use this tool to assist with composing original melodies for training or performance purposes. It could be incorporated into learning software, where students can practice interacting with musical scales and chords. Gaming developers could also incorporate it in their development pipeline to generate unique soundtracks for different gaming levels or scenes. Musicgen can serve as an interesting addition to digital art galleries too, creating music linked to visual art, enhancing visitors' overall sensory experience. Finally, standalone, it can become an innovative product for music hobbyists exploring their creative skills, or even for businesses in need of custom jingles.



Cost per run
Avg run time

Creator Models

Codellama 34b$?6,555
Llama 2 13b$?17,926
Llama 2 13b Chat$?1,592,213
Codellama 13b$?71,820

Similar Models

Try it!

You can use this area to play around with demo applications that incorporate the Musicgen model. These demos are maintained and hosted externally by third-party creators. If you see an error, message me on Twitter.

Currently, there are no demos available for this model.


Summary of this model and related resources.

Model NameMusicgen
Generate music from a prompt or melody
Model LinkView on Replicate
API SpecView on Replicate
Github LinkView on Github
Paper LinkView on Arxiv


How popular is this model, by number of runs? How popular is the creator, by the sum of all their runs?

Model Rank
Creator Rank


How much does it cost to run this model? How long, on average, does it take to complete a run?

Cost per Run$-
Prediction Hardware-
Average Completion Time-