Post-processing
The music is used after processing to generate lyrics, covers, WAV, MIDI, MP4, and human sound separation. These capabilities are submitted through POST /v1/tasks and through GET /v1/tasks/{task_id} queries.
Route List
| Methodology | Path | Purpose |
|---|---|---|
POST | /v1/tasks | Creates lyrics, covers, formatting or human sound separation task. |
GET | /v1/tasks/{task_id} | Ask for task status, cause of failure and result. |
Generate lyrics
The lyrics prompt suggest that they be contained within 200 characters, with the theme, emotions, language and approximate structure clearly written. Avoid pasting the full copyrighted lyrics or excessively long text; if task returns unsuccessful, shorten and rewrite prompt and try again.
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"
}'Generate Cover
curl https://moonnexai.com/v1/tasks \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-cover",
"taskId": "task_xxx",
"callBackUrl": "https://example.com/callback"
}'Convert WAV
curl https://moonnexai.com/v1/tasks \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-wav",
"taskId": "task_xxx",
"audioId": "807233aa-438a-4b5c-a203-9b64299ed238",
"callBackUrl": "https://example.com/callback"
}'We're not gonna get a sound.
curl https://moonnexai.com/v1/tasks \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-vocal-removal",
"taskId": "task_xxx",
"audioId": "807233aa-438a-4b5c-a203-9b64299ed238",
"type": "split_stem",
"callBackUrl": "https://example.com/callback"
}'Generate MIDI
The MIDI generation is usually followed by the human sound separation task. First suno-vocal-removal, when task is successful, then the taskId of the pre-task is used to submit MIDI; if the available audio clip ID is available in the result, it can also be passed on audioId simultaneously.
curl https://moonnexai.com/v1/tasks \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-midi",
"taskId": "task_xxx",
"callBackUrl": "https://example.com/callback"
}'Create MP4
curl https://moonnexai.com/v1/tasks \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-mp4",
"taskId": "task_xxx",
"audioId": "807233aa-438a-4b5c-a203-9b64299ed238",
"callBackUrl": "https://example.com/callback"
}'Model selection
| scene | Recommended Default Model |
|---|---|
| Generate lyrics | suno-lyrics |
| Generate Cover | suno-cover |
| Convert WAV | suno-wav |
| Generate MIDI | suno-midi |
| Create MP4 | suno-mp4 |
| We're not gonna get a sound. | suno-vocal-removal |
Required fields at a glance
| Models | You will fill in field |
|---|---|
suno-lyrics | prompt, callBackUrl |
suno-cover | taskId, callBackUrl |
suno-wav | taskId, audioId, callBackUrl |
suno-vocal-removal | taskId, audioId, callBackUrl |
suno-midi | taskId, callBackUrl |
suno-mp4 | taskId, audioId, callBackUrl |
Query Results
curl https://moonnexai.com/v1/tasks/task_xxx \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>"Check status first. After success, read the result field in response; display fail_reason or error.message if failure.