Генерация музыки
This page includes Suno song generation, lyric generation, upload, and task-query endpoints.
Охват Apifox
- Suno: async task flow, song generation, lyric generation, upload, song stitching, single-task query, batch-task query
- Udio: chat-format integration
API моделей / Генерация музыки / Suno
POST Generate Song
POST /suno/submit/music
Suno v5 update notes
Model version identifier: mv=chirp-crow
v5 smart-model upgrade The clearest audio Suno has produced so far More realistic vocal reproduction More creative control over every element Better understanding of genres and more nuanced genre blending
There are three operating modes:
-
Inspiration mode: You only need to provide the following parameters: gpt_description_prompt make_instrumental mv Suno automatically generates the lyrics, title, and style tags.
-
Custom mode: Required parameters: prompt title tags make_instrumental mv
-
Continue an existing track Also include the following on top of custom mode: task_id continue_at continue_clip_id
Body Parameters
以下任选其一
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
}
Request Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | No | none |
| Content-Type | header | string | No | none |
| Accept | header | string | No | none |
| body | body | object | No | none |
| » prompt | body | string | No | Lyrics (custom mode only). |
| » mv | body | string | No | Music-version model. Supported values include chirp-v3-0 and chirp-v3-5. Defaults to chirp-v3-0 when omitted. |
| » title | body | string | No | Title (custom mode only). |
| » tags | body | string | No | Style tags (custom mode only). |
| » make_instrumental | body | boolean | Yes | Whether to generate instrumental-only output. Set to true to create an instrumental track. |
| » task_id | body | string | No | Task ID used to continue or further operate on a previous task. |
| » continue_at | body | number | No | Float. The timestamp in seconds where the song continuation should begin. |
| » continue_clip_id | body | string | No | Song ID for the clip that should be continued. |
| » gpt_description_prompt | body | string | No | Prompt for inspiration mode (inspiration mode only). |
| » notify_hook | body | string | No | callback URL: https://xxxxxxx |
Response Example
200 Response
{
"code": "string",
"message": "string",
"data": "string"
}
Responses
| Status | Meaning | Description | Model |
|---|---|---|---|
| 200 | OK | none | Inline |
Response Schema
Status 200
| Name | Type | Required | Constraints | Chinese Name | Description |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » message | string | true | none | Error message. | |
| » data | string | true | none | task_id |
POST Generate Lyrics
POST /suno/submit/lyrics
Body Parameters
{
"prompt": "dance"
}
Request Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | No | none |
| Content-Type | header | string | No | none |
| Accept | header | string | No | none |
| body | body | object | No | none |
| » prompt | body | string | Yes | Prompt used to generate lyrics. |
| » notify_hook | body | string | No | callback URL |
Response Example
200 Response
{
"code": "string",
"message": "string",
"data": "string"
}
Responses
| Status | Meaning | Description | Model |
|---|---|---|---|
| 200 | OK | none | Inline |
Response Schema
Status 200
| Name | Type | Required | Constraints | Chinese Name | Description |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » message | string | true | none | none | |
| » data | string | true | none | task_id |
POST Upload Music
POST /suno/uploads/audio-url
Body Parameters
{
"url": "http://cdnimg.example.com/ai/2024-06-18/d416d9c3c34eb22c7d8c094831d8dbd0.mp3"
}
Request Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | No | none |
| Content-Type | header | string | No | none |
| Accept | header | string | No | none |
| body | body | object | No | none |
| » prompt | body | string | No | Lyrics (custom mode only). |
| » mv | body | string | No | Music-version model. Supported values include chirp-v3-0 and chirp-v3-5. Defaults to chirp-v3-0 when omitted. |
| » title | body | string | No | Title (custom mode only). |
| » tags | body | string | No | Style tags (custom mode only). |
| » make_instrumental | body | boolean | Yes | Whether to generate instrumental-only output. Set to true to create an instrumental track. |
| » task_id | body | string | No | Task ID used to continue or further operate on a previous task. |
| » continue_at | body | number | No | Float. The timestamp in seconds where the song continuation should begin. |
| » continue_clip_id | body | string | No | Song ID for the clip that should be continued. |
| » gpt_description_prompt | body | string | No | Prompt for inspiration mode (inspiration mode only). |
| » notify_hook | body | string | No | callback URL: https://xxxxxxx |
Response Example
200 Response
{
"code": "string",
"message": "string",
"data": "string"
}
Responses
| Status | Meaning | Description | Model |
|---|---|---|---|
| 200 | OK | none | Inline |
Response Schema
Status 200
| Name | Type | Required | Constraints | Chinese Name | Description |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » message | string | true | none | Error message. | |
| » data | string | true | none | task_id |
POST Concatenate Song
POST /suno/submit/concat
Body Parameters
{
"clip_id": "extend 后的 songID",
"is_infill": false
}
Request Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | No | none |
| Content-Type | header | string | No | none |
| Accept | header | string | No | none |
| body | body | object | No | none |
| » prompt | body | string | No | Lyrics (custom mode only). |
| » mv | body | string | No | Music-version model. Supported values include chirp-v3-0 and chirp-v3-5. Defaults to chirp-v3-0 when omitted. |
| » title | body | string | No | Title (custom mode only). |
| » tags | body | string | No | Style tags (custom mode only). |
| » make_instrumental | body | boolean | Yes | Whether to generate instrumental-only output. Set to true to create an instrumental track. |
| » task_id | body | string | No | Task ID used to continue or further operate on a previous task. |
| » continue_at | body | number | No | Float. The timestamp in seconds where the song continuation should begin. |
| » continue_clip_id | body | string | No | Song ID for the clip that should be continued. |
| » gpt_description_prompt | body | string | No | Prompt for inspiration mode (inspiration mode only). |
| » notify_hook | body | string | No | callback URL: https://xxxxxxx |
Response Example
200 Response
{
"code": "string",
"message": "string",
"data": "string"
}
Responses
| Status | Meaning | Description | Model |
|---|---|---|---|
| 200 | OK | none | Inline |
Response Schema
Status 200
| Name | Type | Required | Constraints | Chinese Name | Description |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » message | string | true | none | Error message. | |
| » data | string | true | none | task_id |
GET Fetch Single Task
GET /suno/fetch/{task_id}
Request Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| task_id | path | string | Yes | none |
| Authorization | header | string | Yes | none |
Response Example
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"
}
]
}
}
Responses
| Status | Meaning | Description | Model |
|---|---|---|---|
| 200 | OK | none | Inline |
Response Schema
Status 200
| Name | Type | Required | Constraints | Chinese Name | Description |
|---|---|---|---|---|---|
| » 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 Batch Fetch Tasks
POST /suno/fetch
Body Parameters
{
"ids": [
"task_id"
],
"action": "MUSIC"
}
Request Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Content-Type | header | string | No | none |
| Accept | header | string | No | none |
| Authorization | header | string | No | none |
| body | body | any | No | none |
Response Example
200 Response
[
null
]
Responses
| Status | Meaning | Description | Model |
|---|---|---|---|
| 200 | OK | none | Inline |
| 201 | Created | none | Inline |
| 401 | Unauthorized | none | Inline |
| 403 | Forbidden | none | Inline |
| 404 | Not Found | none | Inline |