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.

POST/v1/generations

Create a generation from a prompt

POST/v1/generations/{id}/stems

Export separated stems for a generation

POST/v1/lyrics

Generate lyrics with rhyme & syllable control

GET/v1/templates

List public prompt templates

GET/v1/credits

Check 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.