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
- Turn LRC lyrics into caption cues for a lyric video (Python)
A 26-line Python script converts an LRC lyrics file into the cues array for POST /v1/video-captions, so a silent lyric video is captioned for $0.20.
- Lyria 3.5 screens prompts: brand slogans and lyrics in an ad song
Google says every Lyria prompt is safety-screened and it cannot output copyrighted lyrics or named artist voices. How to write a brand jingle brief that passes.
- 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.
- Can one video run only on Shorts in a Video reach campaign? No pin
Google says multi-format Video view and Video reach campaigns can't pin an asset to Shorts-only; Creative Preferences is Demand Gen only. What to build.
Written by Sume