音乐生成
本页收录 Suno 歌曲生成、歌词生成、上传与任务查询接口。
Apifox 覆盖范围补充
- Suno:异步任务、生成歌曲、生成歌词、上传音乐、歌曲拼接、单个查询任务、批量查询任务
- Udio:Chat 格式调用
模型接口/音乐(Music)/Suno
POST 生成歌曲
POST /suno/submit/music
Suno v5版本更新公告 模型版本标识:mv=chirp-crow
v5 智能模型升级 我们迄今为止制作的最清晰的音频 真实还原人声 更富创意地掌控每个元素 更深入地理解和混音音乐类型
分为3种模式
-
灵感模式: 只需要提交以下参数 gpt_description_prompt make_instrumental mv Suno 会自动生成 歌词、标题、风格标签
-
自定义模式: 需要提交参数 prompt title tags make_instrumental mv
3.续写 需要在自定义模式基础上携带 task_id continue_at continue_clip_id
Body 请求参数
以下任选其一
1.灵感模式
{
"gpt_description_prompt": "cat"
}
2.自定义模式(推荐)
{
"prompt": "[Verse]\nWalking down the streets\nBeneath the city lights\nNeon signs flickering\nLighting up the night\nHeart beating faster\nLike a drum in my chest\nI'm alive in this moment\nFeeling so blessed\n\nStilettos on the pavement\nStepping with grace\nSurrounded by the people\nMoving at their own pace\nThe rhythm of the city\nIt pulses in my veins\nLost in the energy\nAs my worries drain\n\n[Verse 2]\nConcrete jungle shining\nWith its dazzling glow\nEvery corner hiding secrets that only locals know\nA symphony of chaos\nBut it's music to my ears\nThe hustle and the bustle\nWiping away my fears",
"tags": "emotional punk",
"mv": "chirp-fenix",
"title": "City Lights"
}
3.续写(推荐)
{
"prompt": "[Verse]\nWalking down the streets\nBeneath the city lights\nNeon signs flickering\nLighting up the night\nHeart beating faster\nLike a drum in my chest\nI'm alive in this moment\nFeeling so blessed\n\nStilettos on the pavement\nStepping with grace\nSurrounded by the people\nMoving at their own pace\nThe rhythm of the city\nIt pulses in my veins\nLost in the energy\nAs my worries drain\n\n[Verse 2]\nConcrete jungle shining\nWith its dazzling glow\nEvery corner hiding secrets that only locals know\nA symphony of chaos\nBut it's music to my ears\nThe hustle and the bustle\nWiping away my fears",
"tags": "bass-driven atmospheric heavy metal",
"mv": "chirp-fenix",
"title": "City Lights",
"task_id": "736a6f88-bd29-4b1e-b110-37132a5325ac"
"continue_clip_id": "ce2cfbce-9ea0-45b0-9386-020c0ff54a49",
"continue_at": 80
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Authorization | header | string | 否 | none |
| Content-Type | header | string | 否 | none |
| Accept | header | string | 否 | none |
| body | body | object | 否 | none |
| » prompt | body | string | 否 | 歌词 (自定义模式专用) |
| » mv | body | string | 否 | mv模型,chirp-v3-0、chirp-v3-5。不写默认 chirp-v3-0 |
| » title | body | string | 否 | 标题(自定义模式专用) |
| » tags | body | string | 否 | 风格标签(自定义模式专用) |
| » make_instrumental | body | boolean | 是 | 是否生成纯音乐,true 为生成纯音乐 |
| » task_id | body | string | 否 | 任务id,用于对之前的任务再操作 |
| » continue_at | body | number | 否 | float,歌曲延长时间,单位秒 |
| » continue_clip_id | body | string | 否 | 歌曲id,需要续写哪首歌 |
| » gpt_description_prompt | body | string | 否 | 灵感模式提示词(灵感模式专用) |
| » notify_hook | body | string | 否 | 回调地址: https://xxxxxxx |
返回示例
200 Response
{
"code": "string",
"message": "string",
"data": "string"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » message | string | true | none | 错误信息 | |
| » data | string | true | none | task_id |
POST 生成歌词
POST /suno/submit/lyrics
Body 请求参数
{
"prompt": "dance"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Authorization | header | string | 否 | none |
| Content-Type | header | string | 否 | none |
| Accept | header | string | 否 | none |
| body | body | object | 否 | none |
| » prompt | body | string | 是 | 歌词提示词 |
| » notify_hook | body | string | 否 | 回调地址 |
返回示例
200 Response
{
"code": "string",
"message": "string",
"data": "string"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » message | string | true | none | none | |
| » data | string | true | none | task_id |
POST 上传音乐
POST /suno/uploads/audio-url
Body 请求参数
{
"url": "http://cdnimg.example.com/ai/2024-06-18/d416d9c3c34eb22c7d8c094831d8dbd0.mp3"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Authorization | header | string | 否 | none |
| Content-Type | header | string | 否 | none |
| Accept | header | string | 否 | none |
| body | body | object | 否 | none |
| » prompt | body | string | 否 | 歌词 (自定义模式专用) |
| » mv | body | string | 否 | mv模型,chirp-v3-0、chirp-v3-5。不写默认 chirp-v3-0 |
| » title | body | string | 否 | 标题(自定义模式专用) |
| » tags | body | string | 否 | 风格标签(自定义模式专用) |
| » make_instrumental | body | boolean | 是 | 是否生成纯音乐,true 为生成纯音乐 |
| » task_id | body | string | 否 | 任务id,用于对之前的任务再操作 |
| » continue_at | body | number | 否 | float,歌曲延长时间,单位秒 |
| » continue_clip_id | body | string | 否 | 歌曲id,需要续写哪首歌 |
| » gpt_description_prompt | body | string | 否 | 灵感模式提示词(灵感模式专用) |
| » notify_hook | body | string | 否 | 回调地址: https://xxxxxxx |
返回示例
200 Response
{
"code": "string",
"message": "string",
"data": "string"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » message | string | true | none | 错误信息 | |
| » data | string | true | none | task_id |
POST 歌曲拼接
POST /suno/submit/concat
Body 请求参数
{
"clip_id": "extend 后的 歌曲ID",
"is_infill": false
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Authorization | header | string | 否 | none |
| Content-Type | header | string | 否 | none |
| Accept | header | string | 否 | none |
| body | body | object | 否 | none |
| » prompt | body | string | 否 | 歌词 (自定义模式专用) |
| » mv | body | string | 否 | mv模型,chirp-v3-0、chirp-v3-5。不写默认 chirp-v3-0 |
| » title | body | string | 否 | 标题(自定义模式专用) |
| » tags | body | string | 否 | 风格标签(自定义模式专用) |
| » make_instrumental | body | boolean | 是 | 是否生成纯音乐,true 为生成纯音乐 |
| » task_id | body | string | 否 | 任务id,用于对之前的任务再操作 |
| » continue_at | body | number | 否 | float,歌曲延长时间,单位秒 |
| » continue_clip_id | body | string | 否 | 歌曲id,需要续写哪首歌 |
| » gpt_description_prompt | body | string | 否 | 灵感模式提示词(灵感模式专用) |
| » notify_hook | body | string | 否 | 回调地址: https://xxxxxxx |
返回示例
200 Response
{
"code": "string",
"message": "string",
"data": "string"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » message | string | true | none | 错误信息 | |
| » data | string | true | none | task_id |
GET 单个查询任务
GET /suno/fetch/{task_id}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 是 | none |
| Authorization | header | string | 是 | none |
返回示例
200 Response
{
"code": "string",
"message": "string",
"data": {
"task_id": "string",
"notify_hook": "string",
"action": "string",
"status": "string",
"fail_reason": "string",
"submit_time": 0,
"start_time": 0,
"finish_time": 0,
"progress": "string",
"data": [
{
"id": "string",
"title": "string",
"status": "string",
"metadata": {
"tags": "string",
"prompt": "string",
"duration": 0,
"error_type": null,
"error_message": null,
"audio_prompt_id": null,
"gpt_description_prompt": "string"
},
"audio_url": "string",
"image_url": "string",
"video_url": "string",
"model_name": "string",
"image_large_url": "string",
"major_model_version": "string"
}
]
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » message | string | true | none | none | |
| » data | object | true | none | none | |
| »» task_id | string | true | none | none | |
| »» notify_hook | string | true | none | none | |
| »» action | string | true | none | none | |
| »» status | string | true | none | none | |
| »» fail_reason | string | true | none | none | |
| »» submit_time | integer | true | none | none | |
| »» start_time | integer | true | none | none | |
| »» finish_time | integer | true | none | none | |
| »» progress | string | true | none | none | |
| »» data | [object] | true | none | none | |
| »»» id | string | true | none | none | |
| »»» title | string | true | none | none | |
| »»» status | string | true | none | none | |
| »»» metadata | object | true | none | none | |
| »»»» tags | string | true | none | none | |
| »»»» prompt | string | true | none | none | |
| »»»» duration | integer | true | none | none | |
| »»»» error_type | null | true | none | none | |
| »»»» error_message | null | true | none | none | |
| »»»» audio_prompt_id | null | true | none | none | |
| »»»» gpt_description_prompt | string | true | none | none | |
| »»» audio_url | string | true | none | none | |
| »»» image_url | string | true | none | none | |
| »»» video_url | string | true | none | none | |
| »»» model_name | string | true | none | none | |
| »»» image_large_url | string | true | none | none | |
| »»» major_model_version | string | true | none | none |
POST 批量查询任务
POST /suno/fetch
Body 请求参数
{
"ids": [
"task_id"
],
"action": "MUSIC"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Content-Type | header | string | 否 | none |
| Accept | header | string | 否 | none |
| Authorization | header | string | 否 | none |
| body | body | any | 否 | none |
返回示例
200 Response
[
null
]
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
| 201 | Created | none | Inline |
| 401 | Unauthorized | none | Inline |
| 403 | Forbidden | none | Inline |
| 404 | Not Found | none | Inline |