音乐回调接口
POST
/你的域名/song/callback
请求参数
Body 参数application/json
songs
array [object {15}]
必需
item_id
string
作品id
status
string
可选
running-生成中
main_succeeded 主功能成功
failed 主功能失败
succeeded 成功
part_failed 部分子功能失败"
audio_hi_status
string
可选
waiting-等待中
running-生成中
sub_succeeded-成功
sub_failed-失败"
lyrics_sections_status
string
可选
waiting-等待中
running-生成中
sub_succeeded-成功
sub_failed-失败"
event
null
可选
model
string
生成的模型
title
string
标题
style
string
风格
prompt
string
音乐描述
duration
integer
时长-秒
created_at
integer
可选
finished_at
integer
可选
audio_url
string
可选
audio_hi_url
string
可选
lyrics_sections
array [object {3}]
歌词对齐信息
示例
{
"songs": [
{
"item_id": "123",
"status": "succeeded",
"audio_hi_status": "sub_succeeded",
"lyrics_sections_status": "sub_succeeded",
"event": "audio_complete",
"model": "TemPolor v3",
"title": "Owl's Moonlit Waltz",
"style": "Pop",
"prompt": "A Song About an Owl’s Moonlit Dance in Happy Style",
"duration": 96,
"created_at": 1747207597,
"finished_at": 1747207721,
"audio_url": "https://****",
"audio_hi_url": "https://****",
"lyrics_sections": [
{
"start": 0.76,
"end": 0.78,
"text": "[intro]"
},
{
"start": 0.9,
"end": 0.92,
"text": "\n[verse]"
},
{
"start": 16.761,
"end": 19.75,
"text": "Under silver beams it flies"
},
{
"start": 20.361,
"end": 23.97,
"text": "Graceful wings that paint the skies"
},
{
"start": 24.502,
"end": 28.612,
"text": "Whispers soft beneath the trees"
},
{
"start": 28.662,
"end": 32.102,
"text": "Night unfolds with gentle breeze"
},
{
"start": 32.462,
"end": 32.482,
"text": "\n[chorus]"
},
{
"start": 33.342,
"end": 36.97,
"text": "Moonlight guides the silent flight"
},
{
"start": 37.622,
"end": 41.123,
"text": "Owls dance in pure delight"
},
{
"start": 41.623,
"end": 45.57,
"text": "Stars above with shining eyes"
},
{
"start": 45.863,
"end": 49.343,
"text": "Joy unfolds before sunrise"
},
{
"start": 49.823,
"end": 49.843,
"text": "\n[chorus]"
},
{
"start": 50.043,
"end": 53.21,
"text": "Moonlight guides the silent flight"
},
{
"start": 53.843,
"end": 57.48,
"text": "Owls dance in pure delight"
},
{
"start": 58.304,
"end": 61.004,
"text": "Stars above with shining eyes"
},
{
"start": 61.024,
"end": 61.964,
"text": "Joy unfolds before sunrise"
},
{
"start": 61.984,
"end": 62.004,
"text": "\n[verse]"
},
{
"start": 62.024,
"end": 63.294,
"text": "Echoes laugh through shadowed glade"
},
{
"start": 63.344,
"end": 64.244,
"text": "Every step a note is played"
},
{
"start": 64.264,
"end": 65.244,
"text": "Twilight wraps the forest deep"
},
{
"start": 65.264,
"end": 66.644,
"text": "Hearts awake from quiet sleep"
},
{
"start": 66.684,
"end": 66.704,
"text": "\n[chorus]"
},
{
"start": 66.744,
"end": 70.324,
"text": "Moonlight guides the silent flight"
},
{
"start": 71.045,
"end": 74.61,
"text": "Owls dance in pure delight"
},
{
"start": 75.025,
"end": 78.765,
"text": "Stars above with shining eyes"
},
{
"start": 79.305,
"end": 82.405,
"text": "Joy unfolds before sunrise"
},
{
"start": 92.366,
"end": 96.026,
"text": "\n[inst]"
}
]
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/你的域名/song/callback' \
--header 'Content-Type: application/json' \
--data-raw '{
"songs": [
{
"item_id": "123",
"status": "succeeded",
"audio_hi_status": "sub_succeeded",
"lyrics_sections_status": "sub_succeeded",
"event": "audio_complete",
"model": "TemPolor v3",
"title": "Owl'\''s Moonlit Waltz",
"style": "Pop",
"prompt": "A Song About an Owl’s Moonlit Dance in Happy Style",
"duration": 96,
"created_at": 1747207597,
"finished_at": 1747207721,
"audio_url": "https://****",
"audio_hi_url": "https://****",
"lyrics_sections": [
{
"start": 0.76,
"end": 0.78,
"text": "[intro]"
},
{
"start": 0.9,
"end": 0.92,
"text": "\n[verse]"
},
{
"start": 16.761,
"end": 19.75,
"text": "Under silver beams it flies"
},
{
"start": 20.361,
"end": 23.97,
"text": "Graceful wings that paint the skies"
},
{
"start": 24.502,
"end": 28.612,
"text": "Whispers soft beneath the trees"
},
{
"start": 28.662,
"end": 32.102,
"text": "Night unfolds with gentle breeze"
},
{
"start": 32.462,
"end": 32.482,
"text": "\n[chorus]"
},
{
"start": 33.342,
"end": 36.97,
"text": "Moonlight guides the silent flight"
},
{
"start": 37.622,
"end": 41.123,
"text": "Owls dance in pure delight"
},
{
"start": 41.623,
"end": 45.57,
"text": "Stars above with shining eyes"
},
{
"start": 45.863,
"end": 49.343,
"text": "Joy unfolds before sunrise"
},
{
"start": 49.823,
"end": 49.843,
"text": "\n[chorus]"
},
{
"start": 50.043,
"end": 53.21,
"text": "Moonlight guides the silent flight"
},
{
"start": 53.843,
"end": 57.48,
"text": "Owls dance in pure delight"
},
{
"start": 58.304,
"end": 61.004,
"text": "Stars above with shining eyes"
},
{
"start": 61.024,
"end": 61.964,
"text": "Joy unfolds before sunrise"
},
{
"start": 61.984,
"end": 62.004,
"text": "\n[verse]"
},
{
"start": 62.024,
"end": 63.294,
"text": "Echoes laugh through shadowed glade"
},
{
"start": 63.344,
"end": 64.244,
"text": "Every step a note is played"
},
{
"start": 64.264,
"end": 65.244,
"text": "Twilight wraps the forest deep"
},
{
"start": 65.264,
"end": 66.644,
"text": "Hearts awake from quiet sleep"
},
{
"start": 66.684,
"end": 66.704,
"text": "\n[chorus]"
},
{
"start": 66.744,
"end": 70.324,
"text": "Moonlight guides the silent flight"
},
{
"start": 71.045,
"end": 74.61,
"text": "Owls dance in pure delight"
},
{
"start": 75.025,
"end": 78.765,
"text": "Stars above with shining eyes"
},
{
"start": 79.305,
"end": 82.405,
"text": "Joy unfolds before sunrise"
},
{
"start": 92.366,
"end": 96.026,
"text": "\n[inst]"
}
]
}
]
}'
返回响应
🟢200成功
*/*
Body
string
可选
示例
success