Skip to content

Mage API · Audio model

Eleven Music API

ElevenLabs songs, with vocals or without

POST https://api.mage.space/v1/eleven_music/generate

At a glance

The Eleven Music API runs Eleven Music v2.5 through Mage at POST https://api.mage.space/v1/eleven_music/generate. A request at the default settings costs 113 Gems (about $0.113), with no subscription. Eleven Music takes no @handle mentions.

  • AudioOutput
  • 1Variant
  • 113Gems per clip, default
  • $0.113About, in USD

Overview

What the Eleven Music API does

Eleven Music by ElevenLabs: songs with lyrics and vocals, or instrumentals, from a description, at exactly the length you pick, up to 5 minutes.

ElevenLabs' music model: songs with vocals or instrumentals, as an MP3 of exactly the requested duration. A prompt that names an artist or quotes copyrighted lyrics is refused by ElevenLabs; the request fails and is refunded.

It generates from the prompt alone.

Quick start

Call the Eleven Music API

Set MAGE_API_KEY, submit to /eleven_music/generate, and poll status_url until the request completes.

cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/eleven_music/generate' \
  --header "Authorization: Bearer $MAGE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "An upbeat indie pop song about a summer road trip, bright guitars, handclaps, female vocals, 110 BPM.",
  "duration": "30",
  "model_id": "eleven-music-v2.5"
}' | jq -r '.status_url')

# Repeat until status is "completed"; result.url is the file
curl "$STATUS_URL" --header "Authorization: Bearer $MAGE_API_KEY"
TypeScript
// npm install @mage-space/sdk
import Mage from '@mage-space/sdk';

const mage = new Mage(); // reads MAGE_API_KEY

const request = await mage.run('eleven_music', {
  prompt: 'An upbeat indie pop song about a summer road trip, bright guitars, handclaps, female vocals, 110 BPM.',
  duration: '30',
  model_id: 'eleven-music-v2.5',
});

console.log(request.result.url);
Python
# pip install mage-space
from mage_space import Mage

mage = Mage()  # reads MAGE_API_KEY

request = mage.run("eleven_music", {
    "prompt": "An upbeat indie pop song about a summer road trip, bright guitars, handclaps, female vocals, 110 BPM.",
    "duration": "30",
    "model_id": "eleven-music-v2.5",
})

print(request["result"]["url"])

Models

Eleven Music model_id values

Send model_id to pick a variant. A request without one runs the default.

model_idNameDefault
eleven-music-v2.5Eleven Music v2.5Yes

Options

Eleven Music parameters

Allowed values across all variants; a variant may offer fewer. The docs list the options per variant.

FieldValues
duration10, 30, 60, 120, 180, 300

Rules

What the Eleven Music API enforces

  • The prompt describes the song, at most 2000 characters.

More audio models

Other audio generation APIs on Mage

  • Audio · from 30 Gems

    Eleven Speech API

    ElevenLabs v4: lifelike speech you can direct

  • Audio · from 19 Gems

    Seed Audio API

    Voices, music, and sound effects from one prompt

FAQ

Frequently asked questions

How much does the Eleven Music API cost?
A Eleven Music request at the default settings (Eleven Music v2.5) costs 113 Gems, about $0.113. Other resolutions, durations, and variants change the price; the response reports the exact charge. A generation that fails is refunded; one Mage's content policy blocks is not.
What is the Eleven Music API endpoint?
POST https://api.mage.space/v1/eleven_music/generate with an Authorization: Bearer header carrying your Mage API key. The response includes a status_url to poll for the result.
Which Eleven Music models can I call?
eleven-music-v2.5 (Eleven Music v2.5). The default is Eleven Music v2.5.
Does Eleven Music support reference images or characters?
Eleven Music takes no image, video, or audio inputs. Eleven Music takes no @handle mentions.
Can I use Eleven Music from Claude or ChatGPT?
Yes. Connect the Mage MCP server to Claude, ChatGPT, Claude Code, Grok, or Cursor and ask for Eleven Music by name. Your assistant reads its options with get_model and quotes the price before it generates.
How long are Eleven Music results kept?
Results and inputs are kept for 30 days. Download anything you want to keep to your own storage.

Start building with Mage

One account, one Gems balance, every model. Pay only for what you generate.