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
Python music generation basics
Correct Python package
100%
100%
Correct import statement
89%
100%
Client initialization
100%
100%
Environment variable auth
100%
100%
Uses music.compose method
50%
100%
Passes prompt parameter
76%
100%
Passes music_length_ms
80%
100%
Valid duration value
80%
100%
Streaming audio write
100%
100%
MP3 output format
100%
100%
Error handling present
100%
100%
JavaScript composition plan workflow
Correct JS package
20%
100%
No deprecated package
20%
100%
Correct client import
20%
100%
Client instantiation
96%
100%
Composition plan creation
20%
78%
Plan inspection step
21%
100%
Two-step workflow
20%
97%
Mutually exclusive params
40%
100%
Stream handling
37%
100%
Env var authentication
100%
100%
Music length parameter
20%
100%
Detailed composition with metadata
Uses compose_detailed
20%
100%
Accesses json field
20%
100%
Accesses filename field
20%
100%
Uses filename for saving
16%
100%
Accesses audio field
22%
100%
Audio as bytes
30%
100%
Saves metadata to JSON
81%
100%
Correct Python import
30%
100%
Passes prompt parameter
56%
100%
Passes music_length_ms
16%
100%
Prints metadata summary
98%
100%
Env var authentication
55%
100%
Content safety and error handling
Catches bad_prompt error
30%
94%
Uses prompt_suggestion
0%
100%
Retries with suggestion
35%
100%
Handles bad_composition_plan
6%
81%
Uses composition_plan_suggestion
0%
83%
Unsafe prompt example
100%
100%
Safe prompt example
100%
100%
Correct SDK usage
0%
100%
Streaming audio save
27%
100%
Logging present
100%
100%
Returns meaningful result
100%
100%
REST API and advanced parameters
Correct API endpoint
0%
100%
Correct auth header
100%
100%
Reads key from environment
100%
100%
Uses force_instrumental
30%
100%
Force instrumental with prompt
46%
100%
Valid jingle duration
32%
100%
Valid ambient duration
32%
100%
Valid sting duration
36%
100%
JSON content type
100%
100%
Sends JSON body
57%
100%
Saves to MP3 files
100%
100%
Script is executable
100%
100%
Three distinct tracks
100%
100%