Use case
Meditation Music API
Wellness, sleep, and meditation apps that need long, calm, ambient audio personalized to a session rather than a fixed playlist.
The problem
Meditation and sleep apps reuse a short library of ambient loops, so frequent users hear the same tracks until they tune out. Long sessions need calm audio that does not abruptly change or introduce vocals or sharp transients. A fixed playlist cannot personalize to a session.
Why MusicAPI fits this
Instrumental-only output via make_instrumental keeps sessions free of vocals and jarring transients.
tags steer toward ambient, drone, and soft textures, so audio stays calm and consistent across a session.
Generate fresh ambient pieces per session so regular users are not stuck with the same handful of loops.
Code sample
A real request against the live API: start a job, then poll the task endpoint until the audio is ready.
# Generate a calm ambient bed for a meditation session
# 1. Start a generation job
curl -X POST https://api.musicapi.ai/api/v1/sonic/create \
-H "Authorization: Bearer $MUSICAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"custom_mode": true,
"mv": "sonic-v5",
"prompt": "A slow, calming ambient soundscape for a guided meditation",
"tags": "ambient, drone, soft pads, slow, no percussion",
"title": "Stillness",
"make_instrumental": true
}'
# Response: { "message": "success", "task_id": "a1b2c3d4-..." }
# 2. Poll until the audio is ready (state: "succeeded")
curl https://api.musicapi.ai/api/v1/sonic/task/a1b2c3d4-... \
-H "Authorization: Bearer $MUSICAPI_KEY"
# Response data[].audio_url is a ready-to-stream MP3 once state is "succeeded".Pricing
MusicAPI is pay-as-you-go with credit packs, plus predictable monthly subscriptions. The per-credit rate is the same across packs and subscriptions. See the pricing page for current rates, free credits, and volume options.
FAQ
How do I get long, continuous calm audio?
Generate a calm base track, then use the extend endpoint to lengthen it for a full session. Keeping tags ambient and slow keeps the texture continuous as you extend.
Can I personalize music per user or session?
Yes. Generate a fresh ambient piece per session by varying the prompt and tags slightly, so frequent users are not hearing the same fixed loop every time.
Can I make seamless loops for sleep mode?
Request slow, low-transient ambient styles that loop well, then loop the returned audio in your player. Instrumental-only output avoids vocals that would break a sleep loop.
Build it in 5 minutes
Get free credits on signup and run real generations before any payment. No credit card required to start.
API details verified 2026-05-16. The API surface evolves; the pricing page always has current rates.