Elevenlabs Music
Playground
Try it on WavespeedAI!ElevenLabs Music generates original songs from text descriptions. Create instrumentals or full compositions with customizable duration. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
Features
ElevenLabs Music
ElevenLabs Music is an AI music generation model that creates songs with vocals or instrumental tracks from text prompts. Describe the genre, mood, and style, include lyrics with structure markers, and the model generates professional-quality music with flexible output formats.
Why Choose This?
-
Songs with vocals or instrumental Generate complete songs with AI vocals, or switch to instrumental-only mode.
-
Flexible song length Control output duration precisely with millisecond-level adjustment.
-
Multiple output formats Export as MP3 (standard/high quality) or WAV at various sample rates.
-
Style and lyrics in one prompt Combine style tags and structured lyrics in a single prompt field.
-
Prompt Enhancer Built-in tool to automatically improve your music descriptions.
Parameters
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Style description and lyrics with structure markers |
| music_length_ms | No | Output duration in milliseconds (default: 40000) |
| force_instrumental | No | Generate instrumental only without vocals (default: disabled) |
| output_format | No | Output format (see options below, default: mp3_standard) |
Output Format Options
| Format | Description |
|---|---|
| mp3_standard | Standard quality MP3 |
| mp3_high_quality | High quality MP3 |
| wav_16khz | WAV at 16kHz sample rate |
| wav_22khz | WAV at 22kHz sample rate |
| wav_24khz | WAV at 24kHz sample rate |
| wav_cd_quality | WAV at CD quality (44.1kHz) |
Prompt Format
Combine style tags and lyrics in the prompt field. Start with genre, mood, and instrument descriptions, then add structured lyrics:
Example:
Hard Trap, Hip Hop, 808 bass, energetic flow, confident male rap vocals, brass stabs, hype music, motivational sports anthem. [Verse] Laced up tight, ready to go Putting on a major show Sweat and tears on the floor Coming back to get some more [Chorus] We don’t stop, we don’t quit Every rep, every hit
How to Use
- Write your prompt — describe the musical style and include lyrics with structure markers.
- Set duration — adjust music_length_ms for desired song length.
- Enable instrumental (optional) — check to generate music without vocals.
- Choose output format — select MP3 or WAV at your preferred quality.
- Run — submit and download your generated music.
Pricing
| Duration | Cost |
|---|---|
| Per second | $0.0083 |
Examples
- 40s song → $0.33
- 120s song → $1.00
- 300s (5 min) → $2.49
Best Use Cases
- Original Music — Generate complete songs for creative projects.
- Instrumental Tracks — Create background music for videos, podcasts, and games.
- Rap & Hip Hop — Produce tracks with AI vocals and beat production.
- Demo Production — Quickly prototype song ideas before studio recording.
- Content Soundtracks — Custom music for social media and marketing.
Pro Tips
- Use the Prompt Enhancer to refine your style descriptions.
- Include specific genre, instrument, and mood tags at the start of your prompt.
- Use [Verse], [Chorus], [Bridge] markers in lyrics for structured song arrangement.
- Enable force_instrumental for background music or beat production.
- Use wav_cd_quality for highest audio fidelity, mp3_standard for smaller file sizes.
- Adjust music_length_ms to match your desired song duration precisely.
Notes
- Only prompt is required; other parameters have defaults.
- Duration is set in milliseconds (e.g., 40000 = 40 seconds, 120000 = 2 minutes).
- force_instrumental overrides any lyrics in the prompt.
- For best results, combine detailed style tags with well-structured lyrics.
Related Models
- ElevenLabs Dubbing — AI-powered video and audio dubbing.
- ElevenLabs Voice Changer — Transform voice recordings with AI.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/elevenlabs/music" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
"music_length_ms": 10000,
"force_instrumental": true,
"output_format": "mp3_standard"
}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | Text description of the music you want to generate. | |
| music_length_ms | integer | No | 10000 | 5000 ~ 300000 | Target duration in milliseconds (5,000-300,000ms, i.e., 5 seconds to 5 minutes). |
| force_instrumental | boolean | No | true | - | Generate instrumental music without vocals. |
| output_format | string | No | mp3_standard | mp3_standard, mp3_high_quality, wav_16khz, wav_22khz, wav_24khz, wav_cd_quality | Audio output format and quality. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of URLs to the generated content (empty when status is not completed). |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |