开始创作音乐
开发中
POST
https://duomiapi.com/api/suno/generate
请求参数
Header 参数
Authorization
string
可选
示例值:
Bh3oi26r1FPFCMrJ59RKngSXB2
Body 参数application/json
callback_url
string
必需
custom_mode
boolean
必需
make_instrumental
boolean
必需
prompt
string
必需
mv
string
必需
title
string
必需
tags
string
必需
negative_tags
string
必需
continue_at
integer
必需
continue_clip_id
null
必需
cover_clip_id
null
必需
示例
{
"callback_url": "https://baidu.com",
"custom_mode": false,
"make_instrumental": false,
"prompt": "A person with shoulder-length brown hair poses indoors. They wear a black top and blue jeans, with one hand under their chin, showcasing a ring. The background shows a blurred interior setting.",
"mv": "chirp-v4",
"title": "美女",
"tags": "Trance, bass drop, female vocal, armin van buren style",
"negative_tags": "dance pop",
"continue_at": 10,
"continue_clip_id": null,
"cover_clip_id": null
}
示例代码
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://duomiapi.com/api/suno/generate' \
--header 'Authorization: Bh3oi26r1FPFCMrJ59RKngSXB2' \
--header 'Content-Type: application/json' \
--data-raw '{
"callback_url": "https://baidu.com",
"custom_mode": false,
"make_instrumental": false,
"prompt": "A person with shoulder-length brown hair poses indoors. They wear a black top and blue jeans, with one hand under their chin, showcasing a ring. The background shows a blurred interior setting.",
"mv": "chirp-v4",
"title": "美女",
"tags": "Trance, bass drop, female vocal, armin van buren style",
"negative_tags": "dance pop",
"continue_at": 10,
"continue_clip_id": null,
"cover_clip_id": null
}'
返回响应
🟢200成功
application/json
Body
No schema defined
示例
{
"code": 200,
"msg": "成功",
"data": [
{
"task_id": "f9761a3e-b396-4060-a35b-a26bbce7ba9b",
"status": 1,
"title": "",
"prompt": "美女"
},
{
"task_id": "f9761a3e-b396-4060-a35b-a26bbce7ba9b",
"status": 1,
"title": "",
"prompt": "美女"
}
],
"exec_time": 0.659346,
"ip": "182.129.131.225"
}
🟠400失败