天谱乐开放平台
接口文档天谱乐开放平台创作音乐
接口文档天谱乐开放平台创作音乐
  1. 歌曲
  • 入门
    • 概览
    • 快速开始
    • 模型及定价
  • API文档
    • 通用说明
      • 基础信息及认证方式
      • 错误码说明
    • 歌曲
      • Voice ID对照表
      • 音乐回调接口
        POST
      • 音乐生成
        POST
      • 任务状态查询
        POST
    • 歌词
      • 歌词回调接口
        POST
      • 歌词生成
        POST
      • 任务状态查询
        POST
    • 纯音乐
      • 纯音乐回调接口
        POST
      • 纯音乐生成
        POST
      • 任务状态查询
        POST
    • 账号查询模块
      • 信息查询
        POST
    • 音轨分离
      • 创建任务
      • 任务状态查询
      • 音轨分离回调接口
  • 其他
    • 旧接口停用说明
    • 联系我们
    • 更新日志
  1. 歌曲

任务状态查询

POST
/open-apis/v1/song/query
输入作品id,查询对应信息。

请求参数

Header 参数
Authorization
string 
API密钥
必需
示例值:
Tempo-********************************-3w
Content-Type
string 
必需
示例值:
application/json; charset=utf-8
Body 参数application/json
item_ids
array[string]
必需
需要查询的任务itemId列表,最大10。
示例
{
    "item_ids": [
        "123"
    ]
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/open-apis/v1/song/query' \
--header 'Authorization: Tempo-********************************-3w' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw '{
    "item_ids": [
        "123"
    ]
}'

返回响应

🟢200成功
application/json
Body
status
integer 
响应状态码
必需
message
string 
响应结果说明
必需
request_id
string 
必需
本次请求的唯一ID、可用于联系客服排查问题等
data
object 
具体的返回结果
必需
songs
array [object {14}] 
作品信息列表
必需
示例
{
    "status": 200000,
    "message": "success",
    "request_id": "4b185c6f-ed37-4b7d-af15-691be79996fc",
    "data": {
        "songs": [
            {
                "item_id": "123",
                "status": "succeeded",
                "audio_hi_status": "sub_succeeded",
                "lyrics_sections_status": "sub_succeeded",
                "event": null,
                "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]"
                    }
                ]
            }
        ]
    }
}
上一页
音乐生成
下一页
歌词回调接口