← Back to all generators

meta/musicgen

Generate music from a prompt or melody

Capabilities

Seed Top-P

Cost

Community model (estimated from hardware time)

Input Parameters

classifier_free_guidance integer

Increases the influence of inputs on the output. Higher values produce lower-varience outputs that adhere more closely to inputs.

Default: 3
continuation boolean

If `True`, generated music will continue from `input_audio`. Otherwise, generated music will mimic `input_audio`'s melody.

Default: false
continuation_end integer

End time of the audio file to use for continuation. If -1 or None, will default to the end of the audio clip.

min: 0
continuation_start integer

Start time of the audio file to use for continuation.

Default: 0 min: 0
duration integer

Duration of the generated audio in seconds.

Default: 8
input_audio string

An audio file that will influence the generated music. If `continuation` is `True`, the generated music will be a continuation of the audio file. Otherwise, the generated music will mimic the audio file's melody.

model_version string

Model to use for generation

Default: "stereo-melody-large"
stereo-melody-large stereo-large melody-large large
multi_band_diffusion boolean

If `True`, the EnCodec tokens will be decoded with MultiBand Diffusion. Only works with non-stereo models.

Default: false
normalization_strategy string

Strategy for normalizing audio.

Default: "loudness"
loudness clip peak rms
output_format string

Output format for generated audio.

Default: "wav"
wav mp3
prompt string

A description of the music you want to generate.

seed integer

Seed for random number generator. If None or -1, a random seed will be used.

temperature number

Controls the 'conservativeness' of the sampling process. Higher temperature means more diversity.

Default: 1
top_k integer

Reduces sampling to the k most likely tokens.

Default: 250
top_p number

Reduces sampling to tokens with cumulative probability of p. When set to `0` (default), top_k sampling is used.

Default: 0
Version: 671ac645ce5e Updated: 2/26/2026 3.3M runs