跳转到主要内容
POST
/
v1
/
music
/
song
/
create
创建音乐
curl --request POST \
  --url https://api.senseaudio.cn/v1/music/song/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "lyrics": "<string>",
  "model": "senseaudio-music-1.0-260319",
  "custom_mode": true,
  "instrumental": true,
  "negative_tags": "<string>",
  "style": "<string>",
  "style_weight": 123,
  "title": "<string>",
  "vocal_gender": "<string>"
}
'
{
  "task_id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.senseaudio.cn/llms.txt

Use this file to discover all available pages before exploring further.

说明

请求生成歌曲,获得异步任务ID。获得异步任务ID后可使用查询歌曲任务 API轮询歌曲生成状态。

歌曲格式

当参数 custom_modefalse 时,歌词需要按照指定格式输入。歌词由多个歌曲段组成,每个段以结构标签开头。模型通过这些标签引导歌曲结构和歌词发展。
标签段落类型是否需要歌词时长参考说明
[intro-short]前奏 Intro❌ 无歌词~0–10 秒短前奏,纯伴奏引入
[intro-medium]前奏 Intro❌ 无歌词~10–20 秒中长前奏版本
[inst-short]纯伴奏段❌ 无歌词~0–10 秒中间的器乐演奏段
[inst-medium]纯伴奏段❌ 无歌词~10–20 秒较长的器乐段
[outro-short]尾奏 Outro❌ 无歌词~0–10 秒短尾部收束
[outro-medium]尾奏 Outro❌ 无歌词~10–20 秒中长尾部收束
[verse]主歌 Verse✅ 需要歌词无固定时长承担叙事内容,应有完整句子
[chorus]副歌 Chorus✅ 需要歌词无固定时长歌曲主题部分,应朗朗上口
[bridge]过渡 Bridge✅ 需要歌词无固定时长连接主歌与副歌,增强情绪转换

授权

Authorization
string
header
必填

格式:Bearer <API_KEY>

请求体

application/json
lyrics
string
必填

歌词或提示词,传入歌词时需要按照上文中的格式输入,提示词则无限制,不能超过 2000 码位

model
enum<string>
必填

模型,目前只能使用senseaudio-music-1.0-260319

可用选项:
senseaudio-music-1.0-260319
custom_mode
boolean

是否自定义模式,即是否传入提示词而不是歌词

instrumental
boolean

是否纯音乐,纯音乐仍然需要传入歌词或提示词

negative_tags
string

负面标签,排除的风格元素

style
string

歌曲风格

style_weight
number

风格权重 0-1

title
string

歌曲标题

vocal_gender
string

歌曲中人声的性别,f代表女性,m代表男性

响应

200 - application/json

成功

task_id
string

任务ID