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 the ElevenLabs Python SDK for basic music generation, including proper package imports, client initialization, streaming audio handling, and authentication setup.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Correct Python package",
"description": "requirements.txt or install command uses the 'elevenlabs' pip package (not a made-up or incorrect package name)",
"max_score": 10
},
{
"name": "Correct import statement",
"description": "Imports ElevenLabs class from the elevenlabs module (i.e. 'from elevenlabs import ElevenLabs')",
"max_score": 10
},
{
"name": "Client initialization",
"description": "Creates a client instance using ElevenLabs() constructor (not some other class or factory)",
"max_score": 10
},
{
"name": "Environment variable auth",
"description": "Relies on ELEVENLABS_API_KEY environment variable for authentication (either by not passing a key, or explicitly reading from env var), rather than hardcoding a fake key string",
"max_score": 10
},
{
"name": "Uses music.compose method",
"description": "Calls client.music.compose() to generate audio (not a made-up method or different endpoint)",
"max_score": 10
},
{
"name": "Passes prompt parameter",
"description": "Passes a 'prompt' parameter to music.compose() with the mood description",
"max_score": 5
},
{
"name": "Passes music_length_ms",
"description": "Passes music_length_ms parameter to music.compose() (converting seconds to milliseconds)",
"max_score": 10
},
{
"name": "Valid duration value",
"description": "The music_length_ms value used is within the valid range of 3000-600000 (e.g. 45 seconds = 45000ms)",
"max_score": 5
},
{
"name": "Streaming audio write",
"description": "Handles the audio response as a stream by iterating over chunks in a loop (e.g. 'for chunk in audio') and writing each chunk to a file, rather than writing the response as a single object",
"max_score": 15
},
{
"name": "MP3 output format",
"description": "Writes output to a file with .mp3 extension opened in binary write mode ('wb')",
"max_score": 5
},
{
"name": "Error handling present",
"description": "Includes try/except or similar error handling around the API call",
"max_score": 10
}
]
}