Turn a music composition plan into a Sume time-range prompt (Python)

ElevenLabs music_v2_5 plans allow 6,132 characters in up to 30 lines. Sume's Music prompt takes 5000 characters. A Python converter for time ranges.

4 min readSume
All posts

An ElevenLabs composition plan for music_v2_5 can run to 6,132 characters across up to 30 lines of 200 characters each. Sume's Music prompt is one text field of 1 to 5000 characters, so a plan has to be folded into time-range sections and checked against that cap before you submit.

The converter below takes a list of sections with durations and writes the [0:00-0:15] Name: text format that Sume's docs show.

The two limits

From the ElevenLabs changelog and the Sume Music docs, read 2026-10-03.

Composition plan versus Sume prompt limits (read 2026-10-03)
ItemElevenLabs music_v2_5 planSume Music 1.0 prompt
Model idmusic_v2_5Lyria through Sume Music
Total sizeUp to 6,132 characters1 to 5000 characters
StructureUp to 30 lines, 200 characters eachOne prompt, time-range markers
Length controlSet in the planNo duration field; state it in the prompt
ExclusionsNot covered hereIn the positive prompt; non-empty negative_prompt returns 400

The converter

The input is a plain list you build from your plan: a name, a length in seconds and a line of direction per section. The script does not parse any vendor JSON, since this page has no field list for it. It accumulates start times, writes the markers, appends a closing clause, and refuses to emit a prompt over 5000 characters.

def fmt(t):
    return f"{t // 60}:{t % 60:02d}"

def to_prompt(style, sections, total_label=None, closing="Instrumental, no vocals."):
    t, lines = 0, []
    for name, seconds, text in sections:
        lines.append(f"[{fmt(t)}-{fmt(t + seconds)}] {name}: {text}")
        t += seconds
    head = f"{style} A {total_label or fmt(t)} track."
    prompt = "\n".join([head, *lines, closing])
    if len(prompt) > 5000:
        raise ValueError(f"prompt is {len(prompt)} characters; the cap is 5000")
    return prompt

sections = [
    ("Intro", 15, "sparse Rhodes and brushes, no trumpet."),
    ("Main", 20, "trumpet answers the Rhodes, bass thickens."),
    ("Outro", 10, "drums drop out, Rhodes alone."),
]
print(to_prompt("Warm lo-fi hip hop, 84 BPM, C minor.", sections, "45-second"))

Fitting a long plan

A plan that is near the ElevenLabs maximum will not fit as it is.

  • Merge neighbouring sections that share an instrument set. Fewer markers say the same thing.
  • Move tempo, key and instrument list into the single style line, and keep per-section text to what changes.
  • Drop text that is a label rather than a direction. A section called Verse 2 with no musical content adds length without information.
  • Keep the exclusion clause. Sume's docs put it in the positive prompt.

Check the result before spending

Sume's docs describe a brief as a creative direction, not a guaranteed setting, and a finished job costs the fixed per-generation price whatever the prompt length. Listen to the first take for the section boundaries, then adjust the durations in the list and run the converter again rather than editing the prompt by hand, so the prompt and the plan stay in step.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume