Compose music
Headers
Query parameters
Request
A simple text prompt to generate a song from. Cannot be used in conjunction with composition_plan.
A detailed composition plan to guide music generation. Cannot be used in conjunction with prompt.
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.
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.
Controls how strictly section durations in the composition_plan are enforced. Only used with composition_plan. When set to true, the model will precisely respect each section’s duration_ms from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan.