Generate music using ElevenLabs Music API - instrumental tracks, songs with lyrics, and fine-grained composition plans
95
93%
Does it follow best practices?
Impact
99%
1.57xAverage score across 5 eval scenarios
Passed
No findings from the security scan
{
"context": "Tests whether the agent correctly uses compose_detailed() to get audio alongside metadata, handles the distinct return fields (json, filename, audio), and understands that compose_detailed returns bytes (not a stream).",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses compose_detailed",
"description": "Calls client.music.compose_detailed() (not music.compose() or another method) to get both audio and metadata in one call",
"max_score": 15
},
{
"name": "Accesses json field",
"description": "Accesses result.json (or equivalent) to retrieve the composition plan and song metadata from the response",
"max_score": 12
},
{
"name": "Accesses filename field",
"description": "Accesses result.filename (or equivalent) from the response to get the output file name",
"max_score": 10
},
{
"name": "Uses filename for saving",
"description": "Uses the filename from the API response (result.filename) as the output file name when saving audio, rather than hardcoding a filename",
"max_score": 10
},
{
"name": "Accesses audio field",
"description": "Accesses result.audio (or equivalent) to get the audio data from the response",
"max_score": 10
},
{
"name": "Audio as bytes",
"description": "Writes result.audio directly to file as bytes (e.g., f.write(result.audio)) — does NOT iterate over chunks like the streaming compose() method",
"max_score": 12
},
{
"name": "Saves metadata to JSON",
"description": "Saves the composition metadata (from result.json) to a separate JSON file",
"max_score": 8
},
{
"name": "Correct Python import",
"description": "Uses 'from elevenlabs import ElevenLabs' for the client import",
"max_score": 5
},
{
"name": "Passes prompt parameter",
"description": "Passes a prompt string to compose_detailed() describing the desired music",
"max_score": 3
},
{
"name": "Passes music_length_ms",
"description": "Passes music_length_ms parameter to compose_detailed() with a value in the valid range (3000-600000; 2 minutes = 120000)",
"max_score": 5
},
{
"name": "Prints metadata summary",
"description": "Prints or logs information from the composition metadata to console (e.g., sections, styles)",
"max_score": 5
},
{
"name": "Env var authentication",
"description": "Uses ELEVENLABS_API_KEY environment variable rather than a hardcoded key",
"max_score": 5
}
]
}