# ElevenLabs Music API

https://getmegabrain.com/media/elevenlabs/music · prices from the live MegaBrain catalogue

> Studio-grade music from a prompt, 3 seconds to 10 minutes, with vocals or instrumental, cleared for commercial use.

| | |
|---|---|
| Model ID | `elevenlabs/music` |
| Task | Text to music |
| Price | $0.72 per minute of audio |

## Call it

```python
import os, time, requests

BASE = "https://getmegabrain.com/api/gateway/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['MEGABRAIN_API_KEY']}"}

job = requests.post(f"{BASE}/queue/elevenlabs/music", headers=HEADERS, json={
  "prompt": "warm lo-fi hip hop with soft piano chords and vinyl crackle",
  "music_length_ms": 30000
}).json()

while requests.get(job["status_url"], headers=HEADERS).json()["status"] not in ("COMPLETED", "FAILED"):
    time.sleep(2)

print(requests.get(job["response_url"], headers=HEADERS).json())
```

## FAQ

**How much does ElevenLabs Music cost through the API?**

$0.72 per minute of audio, charged from a prepaid US-dollar balance. A job the provider fails is refunded in full. There is no subscription.

**How do I use ElevenLabs Music through the API?**

Submit a job with POST https://getmegabrain.com/api/gateway/v1/queue/elevenlabs/music and your MegaBrain API key, poll its status_url until it is COMPLETED, then fetch the result from response_url. The same key and balance work for text models.

**Can I try ElevenLabs Music without writing code?**

Yes: once you sign in, the playground on the model page runs ElevenLabs Music in the browser, paid from the same balance as the API.
