YepAPI
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/v1/media/queue
$0.30/minute

Overview

Eleven Music v2 makes songs and instrumentals from a prompt. Music v2.5 is the newer model at the same price.

PropertyValue
Model IDelevenlabs/music-v2
CategoryMusic 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 results
curl -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

ParameterTypeRequiredDescriptionDefault
modelstringYeselevenlabs/music-v2—
promptstringYesThe music, up to 4,100 characters—
options.durationnumberNo3 to 600 seconds. The track can come back a few seconds longer; you pay for what you asked for30
options.params.lyricsstringNoYour lyrics, up to 4,000 characters—
options.params.force_instrumentalbooleanNoNo vocalsfalse
options.params.generation_modestringNotrack, loop or ambiencetrack
options.params.use_phonetic_namesbooleanNoSpell names by sound in the vocalsfalse
options.params.plan_onlybooleanNoReturn a composition plan (result.data.compositionPlan) instead of music, for $0.01false
options.params.composition_planobjectNoMake 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.

On this page