Generate music and sound effects
Music tasks create songs, instrumental music and sound effects. Submit all tasks through POST /v1/tasks and query them through GET /v1/tasks/{task_id}.
Generate songs
http
POST /v1/tasksbash
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 pure music
json
{
"model": "suno-music-v5.5",
"prompt": "Warm cinematic background music for a product launch.",
"style": "Cinematic, Warm, Corporate",
"title": "Launch Day",
"customMode": true,
"instrumental": true,
"callBackUrl": "https://example.com/moonnexai/webhook"
}Generate sound
bash
curl https://moonnexai.com/v1/tasks \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-sounds-v5",
"prompt": "A clean notification sound, short, bright, modern.",
"callBackUrl": "https://example.com/moonnexai/webhook"
}'Common field
| field | Annotations |
|---|---|
model | Music or audio model names. |
prompt | Subject, lyrics, audio descriptions or creative requirements. |
style | Style, instrument, emotion. |
title | Title. |
customMode | Music generation parameter mode. true means custom prompt, style and title; false means default parameters. |
instrumental | Whether or not to generate pure music. |
callBackUrl | task addresses after completion of callback. |
Required fields at a glance
| Model family | You will fill in field |
|---|---|
suno-music-* | customMode, instrumental, callBackUrl; when customMode=true, also supply prompt, style, title |
suno-sounds-v5 | prompt; recommends that callBackUrl be provided to facilitate the receipt of task completion notifications |