Music API has no duration field: steer length in the prompt

Sume's music router rejects duration and duration_seconds. Ask for a 30-second or 2-minute track in the prompt, with section timestamps, and verify.

4 min readSume
All posts

If you send duration or duration_seconds to Sume's music router, the request is rejected. Put the length in the prompt instead: "a 2-minute track", or a section map such as [0:00-0:30] Intro:. The same goes for avoiding things; a non-empty negative_prompt returns 400 negative_prompt_unsupported, so write what you want in positive terms.

What the router accepts

Sume music router request rules, from docs.sume.com/models/music-router and the OpenAPI reference, read 2026-10-01.
FieldRule
prompt1 to 5,000 characters
modelsume/music-auto, lyria-3.5 or lyria-3-pro
image_urloptional
duration, duration_secondsrejected
negative_promptnon-empty value returns 400
price$0.125 per accepted generation

Length wording that works

  • Name a total: "a 90-second track".
  • Map sections: [0:00-0:20] Intro: soft pads, [0:20-1:00] Verse: ..., [1:00-1:30] Outro: ....
  • Name one moment: "a drum fill at 0:45". One named moment is easier to hit than five.
  • Close with "Instrumental, no vocals." if you want a bed.

Which engine ran

sume/music-auto resolves to Lyria 3.5 today. The job's request.routed_model names the engine that actually ran, and result.lyrics may carry the section map back. Log routed_model with each file so you can explain a change in sound later. Music 1.0 is retiring gradually and resolves through the router, so build new work on the router.

Check the result

Length is a request, not a guarantee. Probe the file before you place it in a timeline. If a bed comes back short, loop it in a render with soundtrack.loop; if long, trim with Timeline audio split. A prompt of 7 axes (emotion, genre, BPM, key, instruments and texture, an arc, era) gives the engine more to hold on to than adjectives alone.

Limits

Prompts over 5,000 characters fail. Pricing is per accepted generation, not per second, so a 30-second and a 3-minute request cost the same $0.125 on Sume's list; do not infer anything about quality from that. Engine prices set by Google differ and are not compared here. See the music router docs and a worked ad example.

Related posts

More in Developers

All Developers posts

Written by Sume