メインコンテンツへスキップ

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 は同じ非同期タスク 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
タスクのステータス: pendingprocessingcompleted、または failed
progress
integer
進捗率 (0-100)。
audio_url
string
オーディオファイルをダウンロードするためのURL(完了時)。
video_url
string
ビジュアライザー付きビデオバージョンのURL(完了時)。
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..."
}