v5
latestOpenAPI 3.1.02026-08-043621,4011.8 MBmusic-generation
Generate Composition Plan
Generate a composition plan from a prompt.
post/v1/music/plan
Headers
xi-api-keystring nullable
Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.
Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.
Request body
Example request
{
"source_composition_plan": {
"negative_global_styles": [
"metal",
"hip-hop",
"country"
],
"positive_global_styles": [
"pop",
"rock",
"jazz"
],
"sections": [
{
"duration_ms": 10000,
"lines": [
"Verse 1 lyrics"
],
"negative_local_styles": [
"metal",
"hip-hop",
"country"
],
"positive_local_styles": [
"pop",
"rock",
"jazz"
],
"section_name": "Verse 1"
}
]
}
}Response
Successful Response
Example response
{
"negative_global_styles": [
"metal",
"hip-hop",
"country"
],
"positive_global_styles": [
"pop",
"rock",
"jazz"
],
"sections": [
{
"duration_ms": 10000,
"lines": [
"Verse 1 lyrics"
],
"negative_local_styles": [
"metal",
"hip-hop",
"country"
],
"positive_local_styles": [
"pop",
"rock",
"jazz"
],
"section_name": "Verse 1"
}
]
}