Skip to content

Musical Overview ​

Music APIs generate songs, lyrics, sound effects and post-processing tasks. Submit through the asynchronous task API, save task_id, then query status, failure details and media results through the common task endpoint.

The scene entrance. ​

Route List ​

MethodologyPathPurpose
POST/v1/tasksCreates music, lyrics, sound or audio after-processing task.
GET/v1/tasks/{task_id}Ask for task status, cause of failure and result.
POST/v1/assets/uploadsUploads or registers reusable audio media assets.
GET/v1/assets/{asset_id}Find media assets details.

Standard request ​

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"
  }'

Query Results ​

bash
curl https://moonnexai.com/v1/tasks/task_xxx \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>"

First judge status. Only if status is succeeded or SUCCESS will read media URLs; if task fails, response will contain fail_reason or error field for display and retesting.

Editing or post-processing may require media[].suno_audio_id from the source task as audioId. Wait for the source task to succeed before requesting an extension, WAV conversion, vocal separation or MP4 creation.

Relevant Pages ​