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 REST API directly, including the right endpoint URL, authentication header, duration range limits, and prompt-mode-only parameters like force_instrumental.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Correct API endpoint",
"description": "Uses POST https://api.elevenlabs.io/v1/music as the API endpoint for music generation",
"max_score": 10
},
{
"name": "Correct auth header",
"description": "Uses 'xi-api-key' as the authentication header name (not 'Authorization', 'X-Api-Key', or other variations)",
"max_score": 12
},
{
"name": "Reads key from environment",
"description": "Reads the API key from the ELEVENLABS_API_KEY environment variable (e.g., $ELEVENLABS_API_KEY)",
"max_score": 8
},
{
"name": "Uses force_instrumental",
"description": "Uses the force_instrumental parameter (set to true) for the commercial jingle track to guarantee no vocals",
"max_score": 12
},
{
"name": "Force instrumental with prompt",
"description": "The track using force_instrumental also uses the prompt parameter (not a composition_plan), since force_instrumental is prompt-mode only",
"max_score": 8
},
{
"name": "Valid jingle duration",
"description": "The 30-second jingle uses music_length_ms=30000 (within valid 3000-600000 range)",
"max_score": 5
},
{
"name": "Valid ambient duration",
"description": "The 10-minute ambient track uses music_length_ms=600000 (within valid 3000-600000 range)",
"max_score": 8
},
{
"name": "Valid sting duration",
"description": "The short sting uses a music_length_ms value of at least 3000 (the minimum, representing ~3 seconds — not a sub-3000 value)",
"max_score": 10
},
{
"name": "JSON content type",
"description": "Sets Content-Type header to application/json in the curl requests",
"max_score": 5
},
{
"name": "Sends JSON body",
"description": "Sends request body as JSON with prompt and music_length_ms fields",
"max_score": 7
},
{
"name": "Saves to MP3 files",
"description": "Saves each track's output to a separate .mp3 file",
"max_score": 5
},
{
"name": "Script is executable",
"description": "Script includes a shebang line (#!/bin/bash or similar) making it executable",
"max_score": 5
},
{
"name": "Three distinct tracks",
"description": "Script generates three separate tracks with different prompts/configurations (not the same call repeated)",
"max_score": 5
}
]
}