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.

5 min readSume
All posts

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

Music request fields, read 2026-10-08
FieldAccepted?Note
promptYes, required1 to 5000 characters
image_urlYes, optionalPublic HTTPS, or null to clear
negative_promptOnly emptyNon-empty returns 400
duration, duration_secondsNoRejected on Music 1.0 and the router
modelRouter onlysume/music-auto, lyria-3.5, lyria-3-pro
mode, webhook_url, wait_timeout_secondsYeswait_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_found and a catalog_url.
  • Read the result from result.artifacts[] where type is audio (usually audio/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

All Media tools posts

Written by Sume