跳轉到主要內容

Documentation Index

Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt

Use this file to discover all available pages before exploring further.

輪詢此端點以檢查音樂生成任務的狀態。
如果建立回應中包含 poll_url,請優先直接呼叫該 URL 輪詢。idtask_id 應視為同一個非同步任務身分。如果該任務已不存在,或無法再透過公開的 async-task 合約解析,TokenLab 會回傳 async_task_not_found,並附上訊息 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.tokenlab.sh/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..."
}