1简介
1.1服务能力简介
让灵感跃动成旋律!天幕AI音乐生成引擎,基于深度谱曲算法与情感时序分析技术,仅需输入一段文字描述或情绪关键词,即可智能生成原创音乐片段,实现“语言到音符”的零门槛创作革命!
1.2效果展示
提示词 |
生成音乐 |
生成封面图、标题 |
a suspenseful electro dance track with pulsing basslines and dark atmospheric synths, building tension for a thriller trailer |
标题: 暗涌脉冲 |
|
It is a beautiful positive track with a upbeat, fashion, funky, electronic, motivational, soft, uplifting, commercial, corporate, stylish, catchy sound. |
标题: 阳光律动 |
2Prompt engine
提示词=主体+场景(氛围/风格)
|
3API接入
3.1请求地址
https://open-api.wondershare.cc/v1/open/capacity/application/tm_text2music
3.2请求参数
Method: POST
Headers
参数名称 |
参数值 |
是否必须 |
示例 |
备注 |
Content-Type |
application/json |
是 |
|
|
Authorization |
|
是 |
Basic xxx |
|
X-Prod-Id |
|
是 |
123 |
|
Body
名称 |
类型 |
是否必须 |
默认值 |
备注 |
其他信息 |
prompt |
string |
必须 |
|
提示词,token < 77 多余的会被截断 |
|
duration |
number |
必须 |
|
用戶期望的生成音檔時長:0 < length < 95 (sec) |
|
wsid |
integer |
必须 |
|
wsid |
|
qty |
integer |
必须 |
|
生成个数 1-4 |
|
units_value |
integer |
必须 |
|
积分扣除单元 例如:如果需要用prompt字段扣分,那就是字符数 |
|
disable_translate |
boolean |
非必须 |
|
是否禁止翻译, 默认为false, 开启翻译 |
|
drive |
string |
非必须 |
|
如果输出的图片、视频等数据用云存储输出,此字段必填,json字符串类型 示例如下: { "space_id": 11111, // 云存储空间id "file_dest_path": "/path/sss", // 云存储存储路径(目录) "file_tag": // 文件标签 [ { "key": "key1", "value": "value1" }, { "key": "key2", "value": "value2" } ] } |
|
file_type |
integer |
非必须 |
|
0: oss 5:云存储 |
|
callback |
string |
非必须 |
|
回调地址 |
|
params |
string |
非必须 |
|
回调透明参数 |
|
priority |
number |
非必须 |
|
任务优先级 |
|
3.3返回数据
名称 |
类型 |
是否必须 |
默认值 |
备注 |
其他信息 |
code |
number |
必须 |
|
错误码 |
|
msg |
string |
必须 |
|
错误信息 |
|
data |
object |
非必须 |
|
|
|
├─ task_id |
string |
非必须 |
|
任务ID |
|
3.4完整示例