跳到主要内容

音乐生成

本页收录 Suno 歌曲生成、歌词生成、上传与任务查询接口。

Apifox 覆盖范围补充

  • Suno:异步任务、生成歌曲、生成歌词、上传音乐、歌曲拼接、单个查询任务、批量查询任务
  • Udio:Chat 格式调用

模型接口/音乐(Music)/Suno

POST 生成歌曲

POST /suno/submit/music

Suno v5版本更新公告 模型版本标识:mv=chirp-crow

v5 智能模型升级 我们迄今为止制作的最清晰的音频 真实还原人声 更富创意地掌控每个元素 更深入地理解和混音音乐类型

分为3种模式

  1. 灵感模式: 只需要提交以下参数 gpt_description_prompt make_instrumental mv Suno 会自动生成 歌词、标题、风格标签

  2. 自定义模式: 需要提交参数 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
}

请求参数

名称位置类型必选说明
Authorizationheaderstringnone
Content-Typeheaderstringnone
Acceptheaderstringnone
bodybodyobjectnone
» promptbodystring歌词 (自定义模式专用)
» mvbodystringmv模型,chirp-v3-0、chirp-v3-5。不写默认 chirp-v3-0
» titlebodystring标题(自定义模式专用)
» tagsbodystring风格标签(自定义模式专用)
» make_instrumentalbodyboolean是否生成纯音乐,true 为生成纯音乐
» task_idbodystring任务id,用于对之前的任务再操作
» continue_atbodynumberfloat,歌曲延长时间,单位秒
» continue_clip_idbodystring歌曲id,需要续写哪首歌
» gpt_description_promptbodystring灵感模式提示词(灵感模式专用)
» notify_hookbodystring回调地址: https://xxxxxxx

返回示例

200 Response

{
"code": "string",
"message": "string",
"data": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codestringtruenonenone
» messagestringtruenone错误信息
» datastringtruenonetask_id

POST 生成歌词

POST /suno/submit/lyrics

Body 请求参数

{
"prompt": "dance"
}

请求参数

名称位置类型必选说明
Authorizationheaderstringnone
Content-Typeheaderstringnone
Acceptheaderstringnone
bodybodyobjectnone
» promptbodystring歌词提示词
» notify_hookbodystring回调地址

返回示例

200 Response

{
"code": "string",
"message": "string",
"data": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codestringtruenonenone
» messagestringtruenonenone
» datastringtruenonetask_id

POST 上传音乐

POST /suno/uploads/audio-url

Body 请求参数

{
"url": "http://cdnimg.example.com/ai/2024-06-18/d416d9c3c34eb22c7d8c094831d8dbd0.mp3"
}

请求参数

名称位置类型必选说明
Authorizationheaderstringnone
Content-Typeheaderstringnone
Acceptheaderstringnone
bodybodyobjectnone
» promptbodystring歌词 (自定义模式专用)
» mvbodystringmv模型,chirp-v3-0、chirp-v3-5。不写默认 chirp-v3-0
» titlebodystring标题(自定义模式专用)
» tagsbodystring风格标签(自定义模式专用)
» make_instrumentalbodyboolean是否生成纯音乐,true 为生成纯音乐
» task_idbodystring任务id,用于对之前的任务再操作
» continue_atbodynumberfloat,歌曲延长时间,单位秒
» continue_clip_idbodystring歌曲id,需要续写哪首歌
» gpt_description_promptbodystring灵感模式提示词(灵感模式专用)
» notify_hookbodystring回调地址: https://xxxxxxx

返回示例

200 Response

{
"code": "string",
"message": "string",
"data": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codestringtruenonenone
» messagestringtruenone错误信息
» datastringtruenonetask_id

POST 歌曲拼接

POST /suno/submit/concat

Body 请求参数

{
"clip_id": "extend 后的 歌曲ID",
"is_infill": false
}

请求参数

名称位置类型必选说明
Authorizationheaderstringnone
Content-Typeheaderstringnone
Acceptheaderstringnone
bodybodyobjectnone
» promptbodystring歌词 (自定义模式专用)
» mvbodystringmv模型,chirp-v3-0、chirp-v3-5。不写默认 chirp-v3-0
» titlebodystring标题(自定义模式专用)
» tagsbodystring风格标签(自定义模式专用)
» make_instrumentalbodyboolean是否生成纯音乐,true 为生成纯音乐
» task_idbodystring任务id,用于对之前的任务再操作
» continue_atbodynumberfloat,歌曲延长时间,单位秒
» continue_clip_idbodystring歌曲id,需要续写哪首歌
» gpt_description_promptbodystring灵感模式提示词(灵感模式专用)
» notify_hookbodystring回调地址: https://xxxxxxx

返回示例

200 Response

{
"code": "string",
"message": "string",
"data": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codestringtruenonenone
» messagestringtruenone错误信息
» datastringtruenonetask_id

GET 单个查询任务

GET /suno/fetch/{task_id}

请求参数

名称位置类型必选说明
task_idpathstringnone
Authorizationheaderstringnone

返回示例

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"
}
]
}
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codestringtruenonenone
» messagestringtruenonenone
» dataobjecttruenonenone
»» task_idstringtruenonenone
»» notify_hookstringtruenonenone
»» actionstringtruenonenone
»» statusstringtruenonenone
»» fail_reasonstringtruenonenone
»» submit_timeintegertruenonenone
»» start_timeintegertruenonenone
»» finish_timeintegertruenonenone
»» progressstringtruenonenone
»» data[object]truenonenone
»»» idstringtruenonenone
»»» titlestringtruenonenone
»»» statusstringtruenonenone
»»» metadataobjecttruenonenone
»»»» tagsstringtruenonenone
»»»» promptstringtruenonenone
»»»» durationintegertruenonenone
»»»» error_typenulltruenonenone
»»»» error_messagenulltruenonenone
»»»» audio_prompt_idnulltruenonenone
»»»» gpt_description_promptstringtruenonenone
»»» audio_urlstringtruenonenone
»»» image_urlstringtruenonenone
»»» video_urlstringtruenonenone
»»» model_namestringtruenonenone
»»» image_large_urlstringtruenonenone
»»» major_model_versionstringtruenonenone

POST 批量查询任务

POST /suno/fetch

Body 请求参数

{
"ids": [
"task_id"
],
"action": "MUSIC"
}

请求参数

名称位置类型必选说明
Content-Typeheaderstringnone
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyanynone

返回示例

200 Response

[
null
]

返回结果

状态码状态码含义说明数据模型
200OKnoneInline
201CreatednoneInline
401UnauthorizednoneInline
403ForbiddennoneInline
404Not FoundnoneInline

返回数据结构