查询:批量查询任务
POST
https://api.chatgptsb.com/suno/fetch
请求参数
Header 参数
Content-Type
string
可选
示例值:
application/json
Authorization
string
可选
示例值:
Bearer sk-xxxx
Body 参数application/json
ids
array[string]
任务ID列表
action
enum<string>
回调地址
枚举值:
MUSICLYRICS
示例值:
MUSIC
示例
{
"ids": [
"2a145658-3342-4228-b779-b8323a2b77df1",
"2a145658-3342-4228-b779-b8323a2b77df2"
]
}
或
{
"ids": [
"2a145658-3342-4228-b779-b8323a2b77df1",
"2a145658-3342-4228-b779-b8323a2b77df2"
],
"action": "MUSIC"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.chatgptsb.com/suno/fetch' \
--header 'Authorization: Bearer sk-xxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"ids": [
"2a145658-3342-4228-b779-b8323a2b77df1",
"2a145658-3342-4228-b779-b8323a2b77df2"
]
}
或
{
"ids": [
"2a145658-3342-4228-b779-b8323a2b77df1",
"2a145658-3342-4228-b779-b8323a2b77df2"
],
"action": "MUSIC"
}'
返回响应
🟢200成功
application/json
Body
code
string
必需
message
string
必需
data
array [object {9}]
必需
task_id
string
可选
action
string
可选
status
string
可选
fail_reason
string
可选
submit_time
integer
可选
start_time
integer
可选
finish_time
integer
可选
progress
string
可选
data
array [object {22}]
可选
示例
{
"code": "success",
"message": "",
"data": [
{
"task_id": "2a145658-3342-4228-b779-b8323a2b77df",
"action": "MUSIC",
"status": "SUCCESS",
"fail_reason": "",
"submit_time": 1726911801,
"start_time": 1726911812,
"finish_time": 1726911897,
"progress": "100%",
"data": [
{
"id": "3435e194-50e7-4edc-9442-bffe072fccfc",
"title": "快乐周末",
"handle": "yellowrobots6855",
"status": "complete",
"user_id": "ee5e241a-ead6-435d-bea8-526c77c04c72",
"is_liked": false,
"metadata": {
"tags": "heartfelt salsa",
"type": "gen",
"prompt": "",
"stream": true,
"history": null,
"duration": 128.92,
"error_type": null,
"error_message": null,
"concat_history": null,
"refund_credits": false,
"audio_prompt_id": null,
"gpt_description_prompt": null
},
"reaction": null,
"audio_url": "https://cdn1.suno.ai/3435e194-50e7-4edc-9442-bffe072fccfc.mp3",
"image_url": "https://cdn2.suno.ai/image_3435e194-50e7-4edc-9442-bffe072fccfc.jpeg",
"is_public": false,
"video_url": "https://cdn1.suno.ai/3435e194-50e7-4edc-9442-bffe072fccfc.mp4",
"created_at": "2024-09-21T09:43:21.637Z",
"is_trashed": false,
"model_name": "chirp-v3",
"play_count": 0,
"display_name": "YellowRobots6855",
"upvote_count": 0,
"image_large_url": "https://cdn2.suno.ai/image_large_3435e194-50e7-4edc-9442-bffe072fccfc.jpeg",
"is_video_pending": false,
"is_handle_updated": false,
"major_model_version": "v3.5"
},
{
"id": "1d01fcc8-71bf-4e0f-ab0a-880a0580e6fe",
"title": "快乐周末",
"handle": "yellowrobots6855",
"status": "complete",
"user_id": "ee5e241a-ead6-435d-bea8-526c77c04c72",
"is_liked": false,
"metadata": {
"tags": "heartfelt salsa",
"type": "gen",
"prompt": "",
"stream": true,
"history": null,
"duration": 148.28,
"error_type": null,
"error_message": null,
"concat_history": null,
"refund_credits": false,
"audio_prompt_id": null,
"gpt_description_prompt": null
},
"reaction": null,
"audio_url": "https://cdn1.suno.ai/1d01fcc8-71bf-4e0f-ab0a-880a0580e6fe.mp3",
"image_url": "https://cdn2.suno.ai/image_1d01fcc8-71bf-4e0f-ab0a-880a0580e6fe.jpeg",
"is_public": false,
"video_url": "https://cdn1.suno.ai/1d01fcc8-71bf-4e0f-ab0a-880a0580e6fe.mp4",
"created_at": "2024-09-21T09:43:21.637Z",
"is_trashed": false,
"model_name": "chirp-v3",
"play_count": 0,
"display_name": "YellowRobots6855",
"upvote_count": 0,
"image_large_url": "https://cdn2.suno.ai/image_large_1d01fcc8-71bf-4e0f-ab0a-880a0580e6fe.jpeg",
"is_video_pending": true,
"is_handle_updated": false,
"major_model_version": "v3.5"
}
]
}
]
}
修改于 2024-11-26 03:13:27