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.

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
| Field | Rule |
|---|---|
| prompt | 1 to 5,000 characters |
| model | sume/music-auto, lyria-3.5 or lyria-3-pro |
| image_url | optional |
| duration, duration_seconds | rejected |
| negative_prompt | non-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
- music_create over MCP: dry run, idempotency key and jobs_wait
How the hosted MCP music_create tool works: prompt inside payload, dry_run preview, a required idempotency_key, and jobs_wait in 55-second slices.
- Retrying a Sume music job: Idempotency-Key and no double charge
Retry a timed-out Sume music request with the same Idempotency-Key and get the original job back. Lyria 3.5 varies per call, so never use a new key.
- Music API metadata field: tag a track job with your own ids
Sume's music request has an optional metadata field, stored on the job and not sent to the provider. Use it to match tracks to your own records.
- Music prompt rejected? Revise the flagged part, keep the brief
When a Sume music request is rejected on policy, rewrite only the flagged content, keep the tempo, key and instruments, and retry inside your spend cap.
Written by Sume