Music API 400s: duration and negative_prompt, and the fix
Sume's Music Router returns 400 if you send duration, duration_seconds or a non-empty negative_prompt. The fix for each, and a request that passes validation.

Three input mistakes make a Sume music request fail at validation, before any generation or charge. Sending duration or duration_seconds is rejected. Sending a non-empty negative_prompt returns HTTP 400 with public_reason=negative_prompt_unsupported. Naming an unknown model returns 400 model_not_found with a catalog_url.
Error and fix
| You sent | Result | Fix |
|---|---|---|
duration: 30 | rejected | Write the length in the prompt: "a 30-second track". |
negative_prompt: "no drums" | 400, negative_prompt_unsupported | Omit the field or send ""; put the exclusion in the prompt. |
model: "lyria-4" | 400 model_not_found | Pick an id from GET /v1/music-router/models. |
Moving the exclusion into the prompt
The Lyria engine does not support negative prompts, so the exclusion goes in as a positive instruction. The docs' own examples: "no vocals, no spoken word" and "Instrumental, no vocals." Add "no spoken word" only under narration.
import os, requests
body = {
"model": "sume/music-auto",
"prompt": "Dry funk loop, 104 BPM, E minor. Clavinet, tight drums. "
"A 20-second track. Instrumental, no vocals, no spoken word.",
}
r = requests.post("https://api.sume.com/v1/music-router/generate",
headers={"Authorization": "Bearer " + os.environ["SUME_API_KEY"],
"Idempotency-Key": "funk-20s-001"},
json=body)
print(r.status_code)
print(r.json())Why rejection beats a silent drop
A field that is ignored without telling you looks like a model that ignored your instruction. Rejecting it makes the cause visible in the first call. The same style applies to the other media endpoints, which refuse ffmpeg-style fields instead of discarding them.
A request rejected at validation does not start a generation; an accepted one is a fixed $0.125. If a policy rejection happens, change the flagged content and keep the musical brief rather than falling back to a generic bed.
Other limits worth checking
The prompt is 1 to 5000 characters. image_url, if you send one, must be a public HTTPS image (or null to clear it). wait_timeout_seconds takes 0 to 30 for sync and subscribe modes. To control length and structure, say so in the prompt, for example "a 2-minute track" or a timed arc such as [0:00-0:30] Intro: ....
Sources
Related posts
More in Developers
- Music prompt limits: 1-5000 characters and no duration field
Sume's Music Router takes a 1 to 5000 character prompt and rejects duration. How to set length and sections in the prompt text, with a request.
- Nano Banana 2.1 PDF and video grounding: Sume takes image URLs
fal's Nano Banana 2.1 Edit page lists video and PDF grounding. Sume's Image API takes public HTTPS image URLs only, so render pages first.
- Nano Banana 2.1 resolution: send 512 or 0.5K, $0.075 per draft
Sume's catalog publishes the smallest Nano Banana tier as 512, and requests may send 512 or 0.5K. A draft bills $0.075; 1K, 2K and 4K bill $0.10, $0.15, $0.20.
- Edit a photo with Nano Banana: aspect_ratio auto and the cost of 100
Send a product photo as input_references to Nano Banana 2.1 or Pro and set aspect_ratio auto to keep its shape. Python request and cost of 100 edits.
Written by Sume