跳轉到主要內容
輪詢此端點以檢查音樂生成任務的狀態。
如果建立回應中包含 poll_url,請優先直接呼叫該 URL 輪詢。idtask_id 應視為同一個非同步任務身分。If the task no longer exists or can no longer be resolved through the public async-task contract, LemonData returns async_task_not_found with the message Task not found or no longer available.

路徑參數

id
string
必填
音樂生成任務 ID。

回應

id
string
任務 ID。
task_id
string
可用時返回的非同步任務 ID 別名。
status
string
任務狀態:pendingprocessingcompletedfailed
progress
integer
進度百分比 (0-100)。
audio_url
string
音訊檔案下載連結(完成時)。
video_url
string
帶有視覺化效果的影片版本連結(完成時)。
title
string
生成的歌曲標題。
lyrics
string
生成或提供的歌詞。
error
string
錯誤訊息(失敗時)。
curl "https://api.lemondata.cc/v1/tasks/ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
  -H "Authorization: Bearer sk-your-api-key"
{
  "id": "ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "task_id": "ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "poll_url": "/v1/tasks/ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "status": "completed",
  "audio_url": "https://cdn.suno.ai/abc123.mp3",
  "video_url": "https://cdn.suno.ai/abc123.mp4",
  "title": "Night Drive",
  "lyrics": "[Verse 1]\nDriving through the night..."
}