Get a 30-second track from Music 1.0 when there is no duration field
Music 1.0 rejects duration and duration_seconds. Steer length in the prompt, for example 'a 30-second track' with timestamped sections; a generation is $0.125.

The rule
Music 1.0 does not accept duration or duration_seconds; sending either is rejected. Length is steered by the prompt, for example 'A 30-second track' or section markers such as [0:00-0:10] Intro. A generation costs a fixed $0.125, so check the result by listening and the audio artifact length rather than trusting the prompt.
Request fields that exist
| Field | Notes |
|---|---|
| prompt | Required, 1 to 5,000 characters; put exclusions here |
| negative_prompt | Unsupported; omit or send an empty string; non-empty gives HTTP 400 negative_prompt_unsupported |
| image_url | Optional public HTTPS image for conditioning |
| mode | async, sync, subscribe or webhook |
| duration / duration_seconds | Not recognized; rejected |
A prompt shape that names the length
Open with genre, tempo and key, name two to four instruments, then write the arc against timestamps. A working pattern: 'Warm lo-fi hip hop, 84 BPM, C minor. Dusty Rhodes chords, brushed drums, a muted trumpet answer at 0:10. A 30-second track. Instrumental, no vocals.' This mirrors the example in the Music Router docs.
The length you get is model-reported behavior, not a guarantee, so if you need exactly 30 seconds for a spot, plan to trim or let Timeline fit it to the video length.
Next steps after generation
Poll the job and read the audio artifact from result.artifacts where type is audio, usually audio/mpeg on media.sume.com. New integrations are steered to the Music Router route; Music 1.0 routes still work and resolve through it. Details: Music 1.0 and Music Router.
Checking the result length
After the job completes, download the mp3 and read its duration with any audio tool. Record the duration next to the prompt wording you used, such as 'a 30-second track', so you learn how closely your prompts steer the length. The docs say Music 1.0 makes full-length structured songs of up to a few minutes, so a short request is a request and not a hard limit.
If the track runs long, trim it in Timeline by fixing the render length to the video; the soundtrack follows the declared output duration.
Common mistakes
Sending duration_seconds is the main one and fails immediately, which is cheap. A subtler mistake is a negative_prompt of 'no drums'; that returns 400 negative_prompt_unsupported. Put the exclusion in the positive prompt. A third is passing a non-public image URL: image URLs must be public HTTPS.
Sources
More in Developers
- GET /v1/jobs returns 404 for a job another key created: Sume's rules
A Sume API key reads only jobs its own member created. A reconciler on a different member's key gets 404 not_found for a real job. How to design for it.
- GLM 5.3 Flash JSON output vs Sume's strict output_schema rules
GLM-5.3-Flash supports JSON output. Sume's run output_schema is stricter: object root, additionalProperties false, all properties required. A schema that works.
- Go httptest for a Sume poll loop: assert next_poll_after_seconds
A 29-line Go test: httptest answers in_progress with next_poll_after_seconds 30 twice, then completed, and asserts the loop slept 30 seconds twice.
- Go: net/http client for a 30-second Wan 3.0 clip, 30 lines
A 30-line Go program using only the standard library: submit wan-3.0 for 30 seconds, poll the job, write clip.mp4. Reserve and per-second rate included.
Written by Sume