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请求地址(POST 请求)
https://open-api.wondershare.cc/v1/open/capacity/application/tm_text2music
3.2请求参数
Headers
|
参数名称 |
参数值 |
是否必须 |
示例 |
备注 |
|
Content-Type |
application/json |
是 |
|
|
|
X-App-Key |
{app_key} |
是 |
xxxxxx |
分配的appkey |
|
Authorization |
Basic {access_token} |
是 |
Basic xxx |
安全验证信息,格式为:Basic {access_token},其中access_token为令牌,通过给的app_key和app_secret生产,生成方式为:base64(app_key:app_secret)
|
Body
|
名称 |
类型 |
是否必须 |
默认值 |
备注 |
|
prompt |
string |
必须 |
|
提示词。支持 77token以内,多余的会被截断,支持英文,需要支持多语言则需要开启翻译。 |
|
duration |
number |
必须 |
|
用户期望生成的音乐时长。支持0-95秒 |
|
qty |
integer |
必须 |
|
音乐个数,支持1-4 |
|
disable_translate |
boolean |
非必须 |
是否禁止翻译 |
|
|
callback |
string |
非必须 |
|
回调地址 |
|
params |
string |
非必须 |
|
回调透明参数 |
返回数据:
|
名称 |
类型 |
是否必须 |
默认值 |
备注 |
|
code |
number |
必须 |
|
错误码 |
|
msg |
string |
必须 |
|
错误文案 |
|
data |
object |
非必须 |
|
|
|
├─ task_id |
string |
非必须 |
|
任务ID |
3.3 请求示例
curl --location --request POST 'https://open-api.wondershare.cc/v1/open/capacity/application/tm_text2music' \
--header 'X-App-Key: XXXXXX' \
--header 'Authorization: Basic XXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "happy pop music for travel vlogs",
"duration": 5,
"qty": 1
}'
3.4 响应结果
-
创建任务接口返回结果:
{
"code": 0,
"msg": "",
"data": {
"task_id": "tm_text2music_multi-2-20251030162955048067a3d10e3832a4"
}
}

