Skip to content

Elevenlabs Music

Integrate

Model id elevenlabs/music
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/elevenlabs/music?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Files like the example: $1.80 1,800 API credits your files are measured before the run Run it on this page

Get API key
ElevenLabs Text to Music #music#text-to-music

Text-to-music generator driven by a prompt or a structured composition plan, with instrumental option

ElevenLabs · Audio

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

88 / 4100

Text description of the desired music.

Optional song duration in milliseconds, ranging from 3000 ms to 600000 ms, applicable only when using a prompt. When omitted, the model determines the duration from the prompt.

Advanced output_format · force_instrumental · respect_sections_durations · composition_plan
default mp3_44100_128

Audio output format, subject to tier requirements: 192 kbps MP3 needs Creator tier or higher, and 44.1 kHz PCM needs Pro tier or higher. Values follow `codec_sample_rate_bitrate`; `mp3_22050_32`, for example, specifies a 22.05 kHz MP3 at 32 kbs. For Twilio audio input, μ-law is commonly used; this format is also written mu-law or approximated as u-law.

Plan defining the music's composition.

POST /run/elevenlabs/music?wait=20 quote → $1.80
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/elevenlabs/music?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Elevenlabs Music

Composes music from a text `prompt` of up to 4100 characters, or from a detailed `composition_plan`. With a prompt, `music_length_ms` can range from 3000 to 600000 milliseconds, and `force_instrumental` guarantees no vocals. `respect_sections_durations` governs how strictly plan sections are timed. Many codec and sample-rate choices are offered through `output_format`.

Parameters

NameType DefaultAllowed Description
promptoptional
Typestring | null
≤ 4,100 characters
Text description of the desired music.
composition_planoptional
Typeobject
Plan defining the music's composition.
composition_plan.positive_global_stylesrequired
Typestring[]
Styles to include throughout the song.
composition_plan.negative_global_stylesrequired
Typestring[]
Styles to exclude throughout the song.
composition_plan.sectionsrequired
Typeobject[]
Sections making up the song.
composition_plan.sections[].section_namerequired
Typestring
1 – 100 characters
Section name, with a length from 1 to 100 characters.
composition_plan.sections[].positive_local_stylesrequired
Typestring[]
Styles to include within this section.
composition_plan.sections[].negative_local_stylesrequired
Typestring[]
Styles to exclude within this section.
composition_plan.sections[].duration_msrequired
Typeinteger
3,000 – 120,000
Section length in milliseconds, ranging from 3000 ms to 120000 ms.
composition_plan.sections[].linesrequired
Typestring[]
Lyrics for this section, limited to 200 characters per line.
music_length_msoptional
Typeinteger | null
3,000 – 600,000
Optional song duration in milliseconds, ranging from 3000 ms to 600000 ms, applicable only when using a prompt. When omitted, the model determines the duration from the prompt.
force_instrumentaloptional
Typeboolean
Defaultfalse
Instrumental-only control, available only when using a prompt. Setting it to true guarantees instrumental output; false allows either instrumental or non-instrumental music according to the prompt.
respect_sections_durationsoptional
Typeboolean
Defaulttrue
Section-timing enforcement for `composition_plan`, with no effect outside that plan. False allows the model to vary individual section lengths, generally improving quality and latency without changing the plan's total song duration; true instead enforces every section's `duration_ms` exactly.
output_formatoptional
Typeenum
Defaultmp3_44100_128
mp3_22050_32mp3_44100_32mp3_44100_64mp3_44100_96mp3_44100_128mp3_44100_192pcm_8000pcm_16000pcm_22050pcm_24000pcm_44100pcm_48000ulaw_8000alaw_8000opus_48000_32opus_48000_64
+3 moreopus_48000_96opus_48000_128opus_48000_192
Audio output format, subject to tier requirements: 192 kbps MP3 needs Creator tier or higher, and 44.1 kHz PCM needs Pro tier or higher. Values follow `codec_sample_rate_bitrate`; `mp3_22050_32`, for example, specifies a 22.05 kHz MP3 at 32 kbs. For Twilio audio input, μ-law is commonly used; this format is also written mu-law or approximated as u-law.
required

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "elevenlabs/music",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 1800,
    "usd": "1.80",
    "charged": 1800,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "audio": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_name": "0-output.mp3",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "audio",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_size": 1843200,
      "duration": 12,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
audio
object {url, content_type, file_name, file_size}Generated music file encoded as MP3 audio.

More models: Text to Music

For AI agents: this page as Markdown is at https://doitong.com/developers/models/elevenlabs/music.md. All models and guides: https://doitong.com/developers/llms.txt