ai-gateway
  1. Suno
ai-gateway
  • Suno
    • Suno Generate
      POST
    • Suno Feed
      GET
    • Suno Concat
      POST
    • Suno Generate (Extend)
      POST
  • Stable Diffusion
    • Stable Diffusion 文生图
      POST
    • Stable Diffusion 图生图
      POST
    • ReActor image
      POST
  • Create chat completion
    POST
  • Create chat completion with stream
    POST
  • Create image
    POST
  • Create speech
    POST
  • Create transcription
    POST
  • asr
    POST
  • asr Copy
    POST
  • Create transcription Copy
    POST
  1. Suno

Suno Generate

开发中
POST
/v1/suno/api/generate/v2/

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/json
prompt
string 
Lyrics
可选
歌词
tags
string 
Style of Music
必需
歌曲风格
mv
string 
Model
必需
固定:chirp-v3-0
title
string 
Title
必需
歌曲名称
continue_clip_id
string 
Extend by Clip ID
可选
基于歌曲ID进行扩写
continue_at
number 
Extend By Clip duration
可选
基于歌曲ID从什么时候开始扩写
gpt_description_prompt
string 
Song Description
可选
描述使用GPT来生成歌词
make_instrumental
boolean 
Instrumental
必需
是否纯音乐
示例
{
	"prompt": "[Intro: Guitar & Drums]\n\n[Verse 1]\n黎明破晓之前的街头,\n我独自踏上这漫长的路,\n城市的灯光逐渐远去,\n心中的自由在不断跳动。\n\n[Chorus]\n在路上,我寻找我的方向,\n不再回头,抛弃一切彷徨。\n人生不是轨道,而是辽阔的旷野,\n每一步都证明我还在奔跑。\n\n[Verse 2]\n风在耳边呼啸而过,\n如同那遥远的呼唤,\n脚下的路通向未知的未来,\n我将无所畏惧地继续前行。\n\n[Chorus]\n在路上,我寻找我的方向,\n不再回头,抛弃一切彷徨。\n人生不是轨道,而是辽阔的旷野,\n每一步都证明我还在奔跑。\n\n[Bridge]\n每一次挫折,每一声呐喊,\n都让我的心更加坚强。\n我知道这条路并不容易,\n但我不会停止,我的梦想在远方。\n\n[Chorus]\n在路上,我寻找我的方向,\n不再回头,抛弃一切彷徨。\n人生不是轨道,而是辽阔的旷野,\n每一步都证明我还在奔跑。\n\n[Outro]\n在路上,我会继续前进,\n无论前方是光明还是阴影。\n人生不是轨道,而是辽阔的旷野,\n我会在路上,直到生命的尽头。",
	"tags": "acoustic gospel",
	"mv": "chirp-v3-5",
	"title": "在路上",
	// "continue_clip_id": "0cba2385-ab69-4dc0-82b3-0179a1e33539",
	// "continue_at": 64.8,
    // "gpt_description_prompt": "一个人奋斗从低谷到成功的经历",
    "make_instrumental": false,
	"generationType": "TEXT",
	"task": "extend"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.aigateway.work/v1/suno/api/generate/v2/' \
--header 'Content-Type: application/json' \
--data-raw '{
	"prompt": "[Intro: Guitar & Drums]\n\n[Verse 1]\n黎明破晓之前的街头,\n我独自踏上这漫长的路,\n城市的灯光逐渐远去,\n心中的自由在不断跳动。\n\n[Chorus]\n在路上,我寻找我的方向,\n不再回头,抛弃一切彷徨。\n人生不是轨道,而是辽阔的旷野,\n每一步都证明我还在奔跑。\n\n[Verse 2]\n风在耳边呼啸而过,\n如同那遥远的呼唤,\n脚下的路通向未知的未来,\n我将无所畏惧地继续前行。\n\n[Chorus]\n在路上,我寻找我的方向,\n不再回头,抛弃一切彷徨。\n人生不是轨道,而是辽阔的旷野,\n每一步都证明我还在奔跑。\n\n[Bridge]\n每一次挫折,每一声呐喊,\n都让我的心更加坚强。\n我知道这条路并不容易,\n但我不会停止,我的梦想在远方。\n\n[Chorus]\n在路上,我寻找我的方向,\n不再回头,抛弃一切彷徨。\n人生不是轨道,而是辽阔的旷野,\n每一步都证明我还在奔跑。\n\n[Outro]\n在路上,我会继续前进,\n无论前方是光明还是阴影。\n人生不是轨道,而是辽阔的旷野,\n我会在路上,直到生命的尽头。",
	"tags": "acoustic gospel",
	"mv": "chirp-v3-5",
	"title": "在路上",
	// "continue_clip_id": "0cba2385-ab69-4dc0-82b3-0179a1e33539",
	// "continue_at": 64.8,
    // "gpt_description_prompt": "一个人奋斗从低谷到成功的经历",
    "make_instrumental": false,
	"generationType": "TEXT",
	"task": "extend"
}'

返回响应

🟢200成功
text/plain
Body
object {0}
示例
{
    "id": "37b99e76-1ead-46ce-8e47-4be98173dcee",
    "clips": [
        {
            "id": "0cba2385-ab69-4dc0-82b3-0179a1e33539",
            "video_url": "",
            "audio_url": "",
            "image_url": null,
            "image_large_url": null,
            "is_video_pending": false,
            "major_model_version": "v3",
            "model_name": "chirp-v3",
            "metadata": {
                "tags": "acoustic gospel",
                "prompt": "",
                "gpt_description_prompt": "一个人奋斗从低谷到成功的经历",
                "audio_prompt_id": null,
                "history": null,
                "concat_history": null,
                "type": "gen",
                "duration": null,
                "refund_credits": null,
                "stream": true,
                "error_type": null,
                "error_message": null
            },
            "is_liked": false,
            "user_id": "716b05f7-180c-44de-80eb-b62282586a6a",
            "display_name": "AllenHu",
            "handle": "allenhu",
            "is_handle_updated": true,
            "is_trashed": false,
            "reaction": null,
            "created_at": "2024-04-23T10:41:57.249Z",
            "status": "submitted",
            "title": "平凡之路2",
            "play_count": 0,
            "upvote_count": 0,
            "is_public": false
        },
        {
            "id": "a2aaa5cd-537f-47bf-9d05-61061c7cea83",
            "video_url": "",
            "audio_url": "",
            "image_url": null,
            "image_large_url": null,
            "is_video_pending": false,
            "major_model_version": "v3",
            "model_name": "chirp-v3",
            "metadata": {
                "tags": "acoustic gospel",
                "prompt": "",
                "gpt_description_prompt": "一个人奋斗从低谷到成功的经历",
                "audio_prompt_id": null,
                "history": null,
                "concat_history": null,
                "type": "gen",
                "duration": null,
                "refund_credits": null,
                "stream": true,
                "error_type": null,
                "error_message": null
            },
            "is_liked": false,
            "user_id": "716b05f7-180c-44de-80eb-b62282586a6a",
            "display_name": "AllenHu",
            "handle": "allenhu",
            "is_handle_updated": true,
            "is_trashed": false,
            "reaction": null,
            "created_at": "2024-04-23T10:41:57.249Z",
            "status": "submitted",
            "title": "平凡之路2",
            "play_count": 0,
            "upvote_count": 0,
            "is_public": false
        }
    ],
    "metadata": {
        "tags": "acoustic gospel",
        "prompt": "",
        "gpt_description_prompt": "一个人奋斗从低谷到成功的经历",
        "audio_prompt_id": null,
        "history": null,
        "concat_history": null,
        "type": "gen",
        "duration": null,
        "refund_credits": null,
        "stream": true,
        "error_type": null,
        "error_message": null
    },
    "major_model_version": "v3",
    "status": "running",
    "created_at": "2024-04-23T10:41:57.236Z",
    "batch_size": 2
}
修改于 2024-09-25 06:00:34
下一页
Suno Feed
Built with