elevenlabs/music
Music is ElevenLabs's AI audio generation model. Produce high-quality music tracks, sound effects, and audio landscapes from natural language prompts.
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runelevenlabs/musicInput Schema
3 parameters · 1 required · 2 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | The text prompt describing the music to generate |
music_length_ms | integer | Optional | The length of the song to generate in milliseconds (3000-600000). If not provided, the model will choose a length based on the prompt. · Min: 3000 · Max: 600000 |
force_instrumental | boolean | Optional | If true, guarantees that the generated song will be instrumental. · Default: false |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "elevenlabs/music",
"prompt": "Mysterious original soundtrack, themes of jungle, rainforest, nature, woodwinds, busy rhythmic tribal percussion.",
"force_instrumental": false
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
ElevenLabs Music
elevenlabs/music creates complete music from a written brief, including composition, arrangement, instrumentation, and production character rather than a simple loop or sound effect. Prompts can describe genre, mood, tempo, performance, structure, and sonic references, while an instrumental option supports score and background-music workflows without vocals. This combination makes the model a practical choice when the creative outcome depends on those qualities rather than on a generic media conversion.
For production work, With lengths from three seconds to ten minutes, the model can cover stingers, social cues, song sections, and sustained pieces while keeping the musical idea coherent over time. The result is most reliable when the source material and creative brief clearly describe the intended subject, progression, visual or sonic character, and the qualities that must remain unchanged.
Highlights
Full-track composition develops musical structure, arrangement, and production from text.
Genre and mood control translates descriptive art direction into a distinct sonic identity.
Instrumental generation supports scores, beds, and cues without sung vocals.
Long-duration coherence enables music from brief stingers through ten-minute pieces.
Pricing
| Generated length | Price |
|---|---|
| Each started minute | $0.800 |
When to Use
| ✅ Good fit | ❌ Consider alternatives |
|---|---|
| The model's named workflow matches the source material and intended output | A different input modality or model route is required |
| A managed asynchronous result is suitable for the production pipeline | A synchronous, interactive editor is essential |
| The documented controls cover the required duration, framing, or format | The project needs controls outside this endpoint's schema |
| Creative iteration benefits from a repeatable request structure | Exact deterministic pixels, frames, geometry, or samples are mandatory |
| A finished downloadable media asset is the desired deliverable | Editable source layers or a native project file are required |
Prompt Guide
For music generation, state the intended result first, then add the subject or source treatment, progression, style, and delivery constraints. Keep one creative variable per phrase, use the documented field names for controls, and change one setting at a time when comparing results.
{
"prompt": "Mysterious original soundtrack, themes of jungle, rainforest, nature, woodwinds, busy rhythmic tribal percussion."
}
Technical Specs
| Spec | Value |
|---|---|
| Model ID | elevenlabs/music |
| Inputs | force_instrumental, music_length_ms, prompt |
| Required inputs | prompt |
| Output fields | content_type, url |
| Execution | Async (submit, then poll for result) |

