Developer Platform
Build on Mai Music
Generate music programmatically. REST API, typed SDKs, and usage analytics for developers.
p99 < 8s
median generation latency
99.98%
uptime
AES-256
encrypted keys & uploads
Endpoints
Everything you need to generate, refine, and license music.
/v1/generationsCreate a generation from a prompt
/v1/generations/{id}/stemsExport separated stems for a generation
/v1/lyricsGenerate lyrics with rhyme & syllable control
/v1/templatesList public prompt templates
/v1/creditsCheck your credit balance
Quick start
Copy-paste to create your first track in seconds.
curl https://api.maimusic.app/v1/generations \
-H "Authorization: Bearer $LYRIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "dreamy city pop, warm synths, nostalgic chorus",
"lyrics": "Neon lights on the boulevard...",
"structure": ["verse", "chorus", "verse", "chorus", "bridge", "outro"],
"params": {
"bpm": 95,
"key": "F",
"duration_seconds": 180,
"vocals": true
}
}'Create an API key in your dashboard — every key is scoped to your account and can be revoked anytime.
POST a prompt to /v1/generations. Poll the generation id until status is "completed".
Download the audio or stems, then manage credits and usage from the analytics panel.
Ready to build with music AI?
API access starts with the Professional plan — 2,500 credits a month, full commercial licensing, and priority generation.