Compose Music With A Detailed Response
Changed onCompose a song from a prompt or a composition plan.
Request
- Base URLhttps://api.elevenlabs.io (the document declares no server; this is the origin it was published from)
- URLhttps://api.elevenlabs.io/v1/music/detailed
- Authnone declared
Query parameters
Output format of the generated audio. Formatted as codec_sample_rate_bitrate. Use "auto" (the default) to let the API pick the best format for the selected model: mp3_44100_128 for v1 models and mp3_48000_192 for v2 models.
When enable_logging is set to false zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers.
Headers
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
{
"music_prompt": {
"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"
}
]
},
"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
Multipart/mixed response with JSON metadata and binary audio file
Changes
- info
added the new optional
queryrequest parameterenable_logging
- info
- warning
deleted the
queryrequest parameterenable_logging
- warning