Music
MoonNexAI music API is used to generate songs, lyrics, sound and music after-processing task. Music task is presented through POST /v1/tasks and then GET /v1/tasks/{task_id} query status and results.
Basic processes
- Select a music model, such as
suno-music-v5.5orsuno-lyrics. - Call
POST /v1/tasksto task. - Saves the
task_idin response. - Call
GET /v1/tasks/{task_id}Query task. - task successfully read audio, cover, lyrics or other media results.
- When task fails, read
fail_reasonorerror.message.
scene page
| Page | Fit to scene |
|---|---|
| Music Generation | Generates songs, pure music and sound effects. |
| Music Editor | The video is a new video of the event, which is being updated, recreated, accompanies, voices, mashup and replaces the clips. |
| Musical Post-Processing | The lyrics, cover, WAV, MIDI, MP4 and human voice are separated. |
| Query and download | Query task status, read and download media results. |
Generate Music
bash
curl https://moonnexai.com/v1/tasks \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-music-v5.5",
"prompt": "A hopeful pop song about finding light after a long night.",
"style": "Pop, Warm, Emotional",
"title": "Morning Light",
"customMode": true,
"instrumental": false,
"callBackUrl": "https://example.com/moonnexai/webhook"
}'Generate lyrics
bash
curl https://moonnexai.com/v1/tasks \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-lyrics",
"prompt": "写一首关于夏夜海边、温柔重逢的中文流行歌词。",
"callBackUrl": "https://example.com/callback"
}'Query task
bash
curl https://moonnexai.com/v1/tasks/task_xxx \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>"Common Models
| scene | Recommended Default Model | Available Models |
|---|---|---|
| Generate Music | suno-music-v5.5 | suno-music-v4, suno-music-v4.5, suno-music-v4.5-plus, suno-music-v4.5-all, suno-music-v5, suno-music-v5.5 |
| Generate sound | suno-sounds-v5 | suno-sounds-v5 |
| Extension of Music | suno-extend-v5.5 | suno-extend-v4, suno-extend-v4.5, suno-extend-v4.5-plus, suno-extend-v4.5-all, suno-extend-v5, suno-extend-v5.5 |
| Upload and recreate | suno-upload-cover-v5.5 | suno-upload-cover-v4, suno-upload-cover-v4.5, suno-upload-cover-v4.5-plus, suno-upload-cover-v4.5-all, suno-upload-cover-v5, suno-upload-cover-v5.5 |
| Upload and extend | suno-upload-extend-v5.5 | suno-upload-extend-v4, suno-upload-extend-v4.5, suno-upload-extend-v4.5-plus, suno-upload-extend-v4.5-all, suno-upload-extend-v5, suno-upload-extend-v5.5 |
| Add Concort | suno-add-instrumental-v5.5 | suno-add-instrumental-v4.5-plus, suno-add-instrumental-v5, suno-add-instrumental-v5.5 |
| Add a Voice | suno-add-vocals-v5.5 | suno-add-vocals-v4.5-plus, suno-add-vocals-v5, suno-add-vocals-v5.5 |
| Generate Mashup | suno-mashup-v5 | suno-mashup-v4, suno-mashup-v4.5, suno-mashup-v4.5-plus, suno-mashup-v4.5-all, suno-mashup-v5 |
| Generate lyrics | suno-lyrics | suno-lyrics |
| Convert WAV | suno-wav | suno-wav |
| Replace Snippet | suno-replace-section | suno-replace-section |
| We're not gonna get a sound. | suno-vocal-removal | suno-vocal-removal |
| Generate MIDI | suno-midi | suno-midi |
| Create MP4 | suno-mp4 | suno-mp4 |
| Generate Cover | suno-cover | suno-cover |
Use recommendations
- The song generation advice is provided both
prompt,styleandtitle, with more stable results. - Pure music task sets
instrumentaltotrue. media[].suno_audio_idasaudioIdfor follow-up task needs to be successfully task returns.- Time-consuming task suggests that callback be configured and that the active query logic be maintained.
- Checks if task status is successful before downloading results.
More parameters and response structures are found in API Reference.