Stream a composed song from a prompt or a composition plan.
Request
This endpoint expects an object.
promptstring or nullOptional<=4100 characters
A simple text prompt to generate a song from. Cannot be used in conjunction with composition_plan.
composition_planobject or nullOptional
A detailed composition plan to guide music generation. Cannot be used in conjunction with prompt.
music_length_msinteger or nullOptional3000-600000
The length of the song to generate in milliseconds. Used only in conjunction with prompt. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_idenumOptionalDefaults to music_v1
The model to use for the generation.
seedinteger or nullOptional0-2147483647
Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt.
force_instrumentalbooleanOptionalDefaults to false
If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the prompt. Can only be used with prompt.
store_for_inpaintingbooleanOptionalDefaults to false
Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting feature.
Response
Streaming audio data in the format specified