Generate music with prompt- and lyric-driven endpoints. The guide links to Muapi’s music hub for current Suno and MiniMax model coverage, pricing, and supported tasks.
Muapi AI Music API landing page · API reference · Playground · Create an API key
Use the endpoint that matches the task and input media. The routes below are enabled Muapi model IDs checked against the current model catalog; availability, request fields, and pricing can change, so verify the linked landing page and endpoint schema before production use.
| Endpoint | Purpose | Category |
|---|---|---|
lyria-3-pro |
Google Lyria 3 Pro: full-length songs up to three minutes from a prompt (genre, mood, structure, optional lyrics) | Text to Audio |
lyria-3 |
Google Lyria 3: short, high-quality clips up to 30 seconds for jingles, intros and loops | Text to Audio |
lyria-2 |
Google Lyria 2: roughly 30-second instrumental tracks | Text to Audio |
minimax-music-3.0 |
Full songs with vocals or instrumentals from a style prompt plus structured lyrics | Text to Audio |
suno-create-music |
Original songs from a description, title and style tags | Text to Audio |
Muapi uses an asynchronous REST contract. Submit a JSON request with your API key, save the returned request_id, then poll the result endpoint. Replace sample URLs with files you control and fields with values supported by the selected endpoint.
curl -X POST https://api.muapi.ai/api/v1/minimax-music-3.0 \
-H "Content-Type: application/json" \
-H "x-api-key: $MUAPI_API_KEY" \
-d '{"prompt": "An upbeat synth-pop anthem with driving drums and a soaring chorus", "lyrics": "[Verse]\\nWalking through the city lights\\n\\n##\\n[Chorus]\\nWe are shining, we are free"}'| Field | Requirement | Notes |
|---|---|---|
prompt |
Required | Prompt for musical style, mood, and instrumentation. |
lyrics |
Required | 10–3000 characters; newlines separate lyric lines and ## marks an instrumental break. |
The Lyria endpoints (lyria-3-pro, lyria-3, lyria-2) take a single prompt field (up to 2,000 characters) and return an MP3. Put any lyrics, structure or instrument notes inside the prompt.
curl -X POST https://api.muapi.ai/api/v1/lyria-3 \
-H "Content-Type: application/json" \
-H "x-api-key: $MUAPI_API_KEY" \
-d '{"prompt": "A warm lo-fi hip hop loop with mellow Rhodes chords, vinyl crackle and a laid-back drum groove."}'curl "https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result" \
-H "x-api-key: $MUAPI_API_KEY"Poll until the task status is completed or failed. Read the response’s output URLs on completion; download outputs you need to retain, since provider-hosted URLs may expire.
Compare supported inputs and output behavior first, then resolution, duration, quality controls, latency, and price for your use case. Similar names do not guarantee interchangeable request schemas. This repository lists representative routes; the canonical landing page contains the current task-specific explanation, examples, and pricing context.
- Keep the API key in an environment variable; do not commit credentials.
- Validate inputs against the selected endpoint’s current schema.
- Handle non-success HTTP responses and failed task states explicitly.
- Retry only when appropriate for the error; avoid submitting duplicate billable jobs after a timeout without checking the original
request_id. - Confirm current pricing and availability on the Muapi page before estimating production cost.