Skip to content

Query and download ​

Music submissions return a task ID. Query individual tasks through the common task API and play or download media only after success.

Query single task ​

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

Download Media ​

When task succeeds, response usually contains media, audio_url, video_url, image_url or similar field. Use returned URLs to play or download media.

media[].suno_audio_id is a common audio ID used for subsequent music editing and reprocessing. When request, such as the extension of music, conversion of WAV, human sound separation and creation of MP4, need audioId, give priority to the suno_audio_id returned with success task.

bash
curl -L "https://example.com/result.mp3" -o song.mp3

Common Status ​

StatusAnnotations
pending / SUBMITTEDSubmitted or prepared.
running / QUEUED / IN_PROGRESSProcessing.
succeeded / SUCCESSAchieved.
failed / FAILUREtask failed.
cancelledtask cancelled.

Query Recommendations ​

  • Saves the task_id that returns each time you submit it.
  • task for music that requires subsequent editing or reprocessing, while keeping media[].suno_audio_id.
  • The front-end display will be judged on status, not on the basis of URL field.
  • Only successful states can display or download media.
  • Read fail_reason, error.code and error.message when failure.
  • Long task suggests using Webhook while retaining the active query.

Relevant Pages ​