Lofi study stream: a 30-second track looped as a Sume soundtrack
A lo-fi study stream needs a bed that repeats cleanly. Generate a 30-second track with Sume's router and loop it under a video with soundtrack.loop.

How do you make a lo-fi study video with AI music? Generate one short bed and loop it. The Music Router's own example prompt is a lo-fi hip hop track: 84 BPM, C minor, dusty Rhodes chords, brushed boom-bap drums, a muted trumpet answer at 0:10, 30 seconds, no vocals. Then a Timeline 1.0 render can repeat that file under your picture with soundtrack.loop.
A loop is only as good as its seam. The docs give you a looping flag and a fade-out, not an automatic crossfade, so write the music with a clean end and check the join by ear.
Generate the bed
Keep the prompt tight and ask for a track that ends on a stable chord, since the loop restarts from the top. The example in the router docs is a good template.
import os
import requests
r = requests.post(
"https://api.sume.com/v1/music-router/generate",
headers={
"Authorization": "Bearer " + os.environ["SUME_API_KEY"],
"Idempotency-Key": "lofi-loop-001",
},
json={
"model": "sume/music-auto",
"prompt": "Warm lo-fi hip hop, 84 BPM, C minor. Dusty Rhodes chords, brushed boom-bap drums, a muted trumpet answer at 0:10. Ends on a resolved Cmin9 chord. A 30-second track. Instrumental, no vocals.",
"mode": "sync",
"wait_timeout_seconds": 30,
},
timeout=60,
)
print(r.status_code)
print(r.json())Loop it under the picture
The soundtrack block takes url, gain_db, loop, fade_out_seconds and duck_db. The render's audio.duration_seconds is 1 to 1800 seconds, so a 30-minute study video is the longest one call can make. The audio.mode of silence declares a length with no spine file, but then soundtrack.duck_db is illegal, since ducking needs a real spine.
| Field | Value for a study stream |
|---|---|
audio.duration_seconds | Up to 1800 |
audio.mode | silence if the bed is the only audio |
soundtrack.loop | true |
soundtrack.fade_out_seconds | Up to 10, so the last repeat ends softly |
soundtrack.duck_db | Not with silence, duck_requires_audio_spine |
When a loop is the wrong tool
If the track must evolve over a long run, generate several beds and join them gaplessly with timeline audio concat, which takes 1 to 20 parts and returns segments[] offsets. Keep wav for any file you will join again, since the docs say mp3 re-adds priming padding at every edge.
Cost and limits to remember
The Music Router charges the fixed Music price per audio generation; a render's cost comes from the Timeline plan, which POST to the plan route returns before any job is created. Check the live prices in GET /v1/catalog.
Sources
Related posts
More in Use cases
- Make 3-minute hold music for a voice agent
ElevenLabs agents can play hold audio up to 180 s and 40 MB. Generate a short loop with Sume music generation and join it into 180 s with timeline audio.
- Meta ad video length by placement: 15 s to 240 min
Meta's placement chart sets different lengths and ratios per placement, from 15 s Messenger Stories to 240 min Feed. A render plan by placement.
- Meta auto-detects AI-made ads: plan for the AI info label
Meta says its ad system detects ads made or edited with third-party AI tools through industry-standard signals and may show an AI info label. What to prepare.
- Meta labels AI images from C2PA and IPTC metadata: what stripping does
Meta reads C2PA and IPTC invisible metadata to label AI images. What the February 2024 post says, what it leaves open for video, and how to check files.
Written by Sume