Query Task
Query the execution status, progress, and generated results of Flow Music asynchronous tasks
すべてのドキュメント/v1/music/tasks/task_01K8AYYM6R03TGZ3Q2P0TZVNPX?language=enリクエスト例
curl --request GET \
--url https://api.apisea.ai/v1/music/tasks/task_01K8AYYM6R03TGZ3Q2P0TZVNPX?language=en \
--header 'Authorization: Bearer <token>'Authentication
AuthorizationstringrequiredAll Flow Music endpoints require Bearer Token authentication
Get your API Key:
Visit the API Key Management Page to get your API Key
Add it to the request header:
Authorization: Bearer YOUR_API_KEYPath Parameters
task_idstringrequiredThe task ID returned after submitting a Flow Music task
Note
The task ID comes from
data[0].task_idin the submission response.
Query Parameters
languagestringdefault: zhLanguage for error messages and some prompt texts
Allowed values: zh, en, ja, ko
Response Fields
codeintegerResponse status code, 200 on success
dataobjectTask details
Task fields
idstringTask ID
statusstringTask status: pending, processing, completed, failed
progressintegerTask progress, range 0-100
costnumberActual amount charged; usually 0 when the task fails
credits_costnumberCredits actually consumed
resultobjectGenerated results after the task completes; the fields returned differ by Flow Music capability
Result Structure
Music Tasks
Music generation, extension, section replacement, cover rearrangement, stem separation, audio upload, audio download, and video rendering usually return a result.music array.
{
"result": {
"music": [
{
"clip_id": "a41aade4-993e-4d28-b56f-d97e7ef7167c",
"audio_url": "https://cdn.example.com/audio/flowmusic_a41aade4.m4a",
"wav_url": "https://cdn.example.com/audio/flowmusic_a41aade4.wav",
"video_url": "https://cdn.example.com/video/flowmusic_a41aade4.mp4",
"file_url": "https://cdn.example.com/audio/flowmusic_a41aade4_stems.zip"
}
]
}
}Lyrics Tasks
Lyrics generation returns a result.lyrics array.
{
"result": {
"lyrics": [
{
"title": "Bleached",
"lyrics": "[Intro]\n(Check)\n(One two)\n..."
}
]
}
}Usage Notes
Note
All Flow Music submission endpoints are asynchronous tasks. After a successful submission, first obtain the
task_id, then call this endpoint to poll the task status; whenstatusiscompleted, read the generated results fromresult.
レスポンス
{
"code": 200,
"data": {
"id": "task_01K8AYYM6R03TGZ3Q2P0TZVNPX",
"status": "completed",
"progress": 100,
"created": 1783413241,
"completed": 1783413352,
"actual_time": 111,
"cost": 0.06,
"credits_cost": 0.6,
"result": {
"music": [
{
"clip_id": "a41aade4-993e-4d28-b56f-d97e7ef7167c",
"title": "My Song",
"duration_seconds": "181.70666667",
"audio_url": "https://cdn.example.com/audio/flowmusic_a41aade4.m4a",
"wav_url": "https://cdn.example.com/audio/flowmusic_a41aade4.wav"
}
]
}
}
}ドキュメントに問題が見つかりましたか?support@apisea.aiまでメールでお知らせください。