跳转到主要内容
轮询此端点以检查音乐生成任务的状态。
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。
status
string
任务状态:pendingprocessingcompletedfailed
progress
integer
进度百分比 (0-100)。
audio_url
string
音频文件的下载 URL(完成时)。
video_url
string
带可视化效果的视频版本 URL(完成时)。
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.example.com/music/abc123.mp3",
  "video_url": "https://cdn.example.com/music/abc123.mp4",
  "title": "Night Drive",
  "lyrics": "[Verse 1]\nDriving through the night..."
}