Suno - 基础创作
音乐接口基于 Suno API,支持音乐创作、扩展、翻唱、音轨分离等功能。
鉴权方式:
Authorization: <api-key>模型版本:
v40、v45、v45+、v45-lite、v50可选参数:
vocalGender(m/f)、styleWeight(0–1)、weirdnessConstraint(0–1)、audioWeight(0–1)
生成歌词
http
POST /generator/suno请求示例:
bash
curl --location --request POST 'https://neolink.com/api/generator/suno' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"task": "lyrics",
"prompt": "A happy song about a girl and a boy."
}'音乐创作
http
POST /generator/suno自定义模式下(customMode: true):
makeInstrumental: true:需提供style和titlemakeInstrumental: false:需提供style、prompt和title
非自定义模式下(customMode: false):
- 仅需提供
prompt,长度限制 400 字符 - 其他参数应留空
请求示例:
bash
curl --location --request POST 'https://neolink.com/api/generator/suno' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"task": "create",
"model": "v50",
"customMode": true,
"makeInstrumental": false,
"prompt": "两只老虎 两只老虎跑得慢 跑得慢一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪",
"tags": "Happy",
"negativeTags": "Sad, Slow",
"title": "两只老虎",
"vocalGender": "f",
"styleWeight": 0.65,
"weirdnessConstraint": 0.65,
"audioWeight": 0.65
}'创建音乐基于角色
http
POST /generator/suno参数同音乐创作,额外参数:
personaId:角色 IDartistClipId:艺术家片段 ID
请求示例:
bash
curl --location --request POST 'https://neolink.com/api/generator/suno' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"task": "create",
"model": "v50",
"customMode": true,
"makeInstrumental": false,
"prompt": "两只老虎 两只老虎跑得慢 跑得慢一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪两只老虎 两只老虎跑得快 跑得快一只没有耳朵一只没有尾巴真奇怪 真奇怪",
"tags": "Happy",
"negativeTags": "Sad, Slow",
"title": "两只老虎",
"vocalGender": "f",
"styleWeight": 0.65,
"weirdnessConstraint": 0.65,
"audioWeight": 0.65,
"personaId": "50976de2-4763-4702-a776-d6c723eb0a28",
"artistClipId": "eb1c6c96-a102-4bbb-82c2-87c3b126a44e"
}'创建角色
http
POST /generator/suno参数说明(task: "persona"):
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
taskId | string | 是 | 任务 ID |
clipId | string | 是 | 歌曲片段 ID |
name | string | 是 | 角色名称 |
description | string | 否 | 角色描述 |
请求示例:
bash
curl --location --request POST 'https://neolink.com/api/generator/suno' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"task": "persona",
"taskId": "de6f28d589c6416f9baabd5d0b227f7f",
"clipId": "2d2991ed-401e-4926-9e7e-9963108e850c",
"name": "两只老虎",
"description": "第一次生成的角色"
}'