音樂生成
本頁收錄 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 |