Music API duration_seconds rejected: set track length in the prompt
Sume Music 1.0 and the Music Router reject duration and duration_seconds. Put the length in the prompt (a 2-minute track) and use time markers.

If you send duration or duration_seconds to Sume Music 1.0 or the Music Router, the API rejects the request. Neither field exists. The docs tell you to control length in the prompt, with phrases such as "a 2-minute track" or timed section markers like [0:00-0:30] Intro: .... Music 1.0 has no seed, temperature or guidance parameter either, so the prompt is the whole control surface.
Fields that exist and fields that do not
| Field | Accepted? | Note |
|---|---|---|
prompt | Yes, required | 1 to 5000 characters |
image_url | Yes, optional | Public HTTPS, or null to clear |
negative_prompt | Only empty | Non-empty returns 400 |
duration, duration_seconds | No | Rejected on Music 1.0 and the router |
model | Router only | sume/music-auto, lyria-3.5, lyria-3-pro |
mode, webhook_url, wait_timeout_seconds | Yes | wait_timeout_seconds is 0 to 30 for sync or subscribe |
A length that fits a video
A fixed length matters when you must match a render. A 15-second reel at 128 BPM is eight bars, as a related post shows, so say both the tempo and the length: "A 15-second track, 128 BPM." The result is a prompt-level request, not a guarantee, so inspect the artifact. If the track is longer than the video, trim or let the timeline cut it. A track that is too short can be extended by timeline audio concat, which joins up to 20 parts without re-synthesis.
Remember the price is the same either way. $0.125 buys one accepted generation whatever the length you ask for in the prompt, according to the Music 1.0 page, so there is no saving from asking for a short track.
Where the 400 shows up
The error appears at request time, before a job exists. Check your SDK or wrapper first, because generic media clients often add a duration field by default. Remove it, move the number into the prompt, and keep the Idempotency-Key stable so the retry maps to the same job.
- Prompt maximum: 5000 characters.
- Music Router unknown model ids fail with
400 model_not_foundand acatalog_url. - Read the result from
result.artifacts[]wheretypeisaudio(usuallyaudio/mpeg).
Checking length after the fact
Because length is a request in words, check what you got. Download the audio artifact from media.sume.com and read its duration with your usual tool. If you need the exact length for a timeline, trim in the render step instead of regenerating. Timeline audio can split a file into ranges at $0.01 per job, which is cheaper than a second $0.125 generation.
Sources
Related posts
More in Media tools
- Music from a still: image_url conditioning costs the same $0.125
Sume Music accepts an optional public HTTPS image_url as conditioning. The price stays a fixed $0.125 whether or not you send the image.
- Music from a still: image_url conditioning, still $0.125
The Music Router accepts an optional public HTTPS image_url to condition the track on a still. Request example, keeping a score consistent, fixed price.
- Music prompt limit: 5000 characters is plenty for a Lyria brief
The Sume Music prompt takes 1 to 5000 characters. A full seven-axis brief with section markers is far shorter, so the limit rarely binds.
- Scoring contrasting scenes: 12 BPM apart and a new lead instrument
Sume's music brief rule for contrasting scenes: change the genre family, move tempo at least 12 BPM, and swap the lead instrument. Keep them for one score.
Written by Sume