AI Models
Eleven Music v2
Songs and instrumentals from a prompt with Eleven Music v2.
Pricing, live playground and model overview: Eleven Music v2 API on YepAPI
POST
$0.30/minute/v1/media/queueOverview
Eleven Music v2 makes songs and instrumentals from a prompt. Music v2.5 is the newer model at the same price.
| Property | Value |
|---|---|
| Model ID | elevenlabs/music-v2 |
| Category | Music Generation |
| Pricing | $0.30 per minute of music |
Usage
All media models use the async job queue. Submit a job, then poll for the result.
Step 1: Submit Job
const res = await fetch('https://api.yepapi.com/v1/media/queue', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'elevenlabs/music-v2',
prompt: 'Warm acoustic folk, fingerpicked guitar, soft female vocal, slow build',
options: {
duration: 60
}
}),
});
const { data } = await res.json();
// data.jobId — use this to poll for resultscurl -X POST https://api.yepapi.com/v1/media/queue \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "elevenlabs/music-v2", "prompt": "Warm acoustic folk, fingerpicked guitar, soft female vocal, slow build", "options": {"duration": 60}}'Step 2: Poll for Result
curl https://api.yepapi.com/v1/media/status/JOB_ID \
-H "x-api-key: YOUR_API_KEY"When status is completed you get result.audio: { mimeType, base64 } (MP3, 128 kbps). Results are kept for one hour.
Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
model | string | Yes | elevenlabs/music-v2 | — |
prompt | string | Yes | The music, up to 4,100 characters | — |
options.duration | number | No | 3 to 600 seconds. The track can come back a few seconds longer; you pay for what you asked for | 30 |
options.params.lyrics | string | No | Your lyrics, up to 4,000 characters | — |
options.params.force_instrumental | boolean | No | No vocals | false |
options.params.generation_mode | string | No | track, loop or ambience | track |
options.params.use_phonetic_names | boolean | No | Spell names by sound in the vocals | false |
options.params.plan_only | boolean | No | Return a composition plan (result.data.compositionPlan) instead of music, for $0.01 | false |
options.params.composition_plan | object | No | Make the music from a plan, edited or not. Sets the length; leave out the other params | — |
Features
- 3 seconds to 10 minutes
- Your own lyrics, or instrumental
- Section-by-section composition plans
- Songs, loops and ambience
Billing
Billed on the duration you ask for, or the plan's. $0.01 minimum.
Info
Rights to use the music follow ElevenLabs' Music Terms. Check them before you release a track commercially. Don't name artists, songs or labels in prompts.
Under the Hood
Powered by ElevenLabs.