Skip to content

🎧 音乐模型 suno-v3

  • 2024.03.27 本站已经支持 音乐模型 suno-v3
  • suno 本身无api, 跟GPTs 一样是通过逆向为openai接口形式得来,
  • 提示词输入一次,生成2首歌曲
  • 计费是按次数,并非按歌曲数
  • 如何使用 访问 https://suno.ddaiai.com 看下面的 在线测试

注意

1.访问 https://suno.ddaiai.com (如果被墙了,换下二级域名前缀 suibian)
2.如果发现被墙了 可以自己换地址 https://suibian.ddaiai.comsuibian 换其他的 如 https://2024.ddaiai.com 都能访问

对话方式调用

  • 以对话方式调用 模型为 suno-v3

设置

cover

效果

  • 将模型设置为 suno-v3cover
  • 输入框 提问对话 得到音乐歌曲2首、歌词、歌曲封面 covercover

程序接入

已经跟openai接口对齐,仅需将模型修改为 suno-v3

shell
curl --request POST \
  --url https://api.openai-hk.com/v1/chat/completions \
  --header 'Authorization: Bearer hk-你的key' \
  --header 'content-type: application/json' \
  --data '{
    "max_tokens": 800,
    "model": "suno-v3",
    "temperature": 0.8,
    "top_p": 1,
    "presence_penalty": 1,
    "stream":false,
    "messages": [ 
        {
            "role": "user",
            "content": "儿时的回忆"
        }
    ]
}'
curl --request POST \
  --url https://api.openai-hk.com/v1/chat/completions \
  --header 'Authorization: Bearer hk-你的key' \
  --header 'content-type: application/json' \
  --data '{
    "max_tokens": 800,
    "model": "suno-v3",
    "temperature": 0.8,
    "top_p": 1,
    "presence_penalty": 1,
    "stream":false,
    "messages": [ 
        {
            "role": "user",
            "content": "儿时的回忆"
        }
    ]
}'

以suno非官方API调用

cover

效果如下 cover

创建歌词任务

post https://api.openai-hk.com/sunoapi/generate/lyrics/

请求体

json
{"prompt":"大海"}
{"prompt":"大海"}

返回

json
{"id":"9561baee-2d64-48fe-8318-d7e82e86712b"}
{"id":"9561baee-2d64-48fe-8318-d7e82e86712b"}

获取歌词

通过上面的ID 获取歌词

get https://api.openai-hk.com/sunoapi/lyrics/{id}

返回

json
{
    "text": "歌词内容",
    "title": "歌词标题",
    "status": "complete"
}
{
    "text": "歌词内容",
    "title": "歌词标题",
    "status": "complete"
}

创建歌曲任务.定制模型

post https://api.openai-hk.com/sunoapi/generate

请求体

json
{
  "prompt": "string",
  "mv": "chirp-v3-0",
  "title": "string",
  "tags": "string",
  "continue_at": 120,
  "continue_clip_id": "string"
}
{
  "prompt": "string",
  "mv": "chirp-v3-0",
  "title": "string",
  "tags": "string",
  "continue_at": 120,
  "continue_clip_id": "string"
}
参数说明类型默认值
mv模型 可行值有 chirp-v3-0 chirp-v3-5stringchirp-v3-0
title标题string
tags歌曲风格多个风格 请用空格分开string
continue_at开始时间integer(int64)
continue_clip_id上一个歌曲的IDstring

返回

json
 {
    "id": "8fb0a232-aef3-4f8a-82ad-72a3fde0bcc6",
    "clips": [
        {
            "id": "e9f2a77a-07d7-444a-a1f7-575477b0ff18",
            "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": "infectious house",
                "prompt": "[Verse]\nBlue waves crashing on the shore\nSunshine smiling evermore\n\n[Verse 2]\nSailboats drifting far from land\nSalt and sand go hand in hand\n\n[Chorus]\nOh the ocean holds my dreams\nIn its tide sun's golden beams\nLet the sea set me free\nIn its waves I find my peace\n\n[Verse 3]\nSeagulls flying by the pier\nWhispers of the water clear\n\n[Bridge]\nEndless horizon meets my eyes\nWhere the sea and sky collide\n\n[Verse 4]\nMoonlight dances on the waves\nIn the ocean's arms we lay",
                "gpt_description_prompt": null,
                "audio_prompt_id": null,
                "history": null,
                "concat_history": null,
                "type": "gen",
                "duration": null,
                "refund_credits": null,
                "stream": true,
                "infill": null,
                "error_type": null,
                "error_message": null
            },
            "is_liked": false,
            "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
            "display_name": "MercurialMetronomes303",
            "handle": "mercurialmetronomes303",
            "is_handle_updated": false,
            "avatar_image_url": null,
            "is_trashed": false,
            "reaction": null,
            "created_at": "2024-06-06T02:21:26.175Z",
            "status": "submitted",
            "title": "大海",
            "play_count": 0,
            "upvote_count": 0,
            "is_public": false
        },
        {
            "id": "399f0745-0168-463c-a18a-f681f5711280",
            "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": "infectious house",
                "prompt": "[Verse]\nBlue waves crashing on the shore\nSunshine smiling evermore\n\n[Verse 2]\nSailboats drifting far from land\nSalt and sand go hand in hand\n\n[Chorus]\nOh the ocean holds my dreams\nIn its tide sun's golden beams\nLet the sea set me free\nIn its waves I find my peace\n\n[Verse 3]\nSeagulls flying by the pier\nWhispers of the water clear\n\n[Bridge]\nEndless horizon meets my eyes\nWhere the sea and sky collide\n\n[Verse 4]\nMoonlight dances on the waves\nIn the ocean's arms we lay",
                "gpt_description_prompt": null,
                "audio_prompt_id": null,
                "history": null,
                "concat_history": null,
                "type": "gen",
                "duration": null,
                "refund_credits": null,
                "stream": true,
                "infill": null,
                "error_type": null,
                "error_message": null
            },
            "is_liked": false,
            "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
            "display_name": "MercurialMetronomes303",
            "handle": "mercurialmetronomes303",
            "is_handle_updated": false,
            "avatar_image_url": null,
            "is_trashed": false,
            "reaction": null,
            "created_at": "2024-06-06T02:21:26.176Z",
            "status": "submitted",
            "title": "大海",
            "play_count": 0,
            "upvote_count": 0,
            "is_public": false
        }
    ],
    "metadata": {
        "tags": "infectious house",
        "prompt": "[Verse]\nBlue waves crashing on the shore\nSunshine smiling evermore\n\n[Verse 2]\nSailboats drifting far from land\nSalt and sand go hand in hand\n\n[Chorus]\nOh the ocean holds my dreams\nIn its tide sun's golden beams\nLet the sea set me free\nIn its waves I find my peace\n\n[Verse 3]\nSeagulls flying by the pier\nWhispers of the water clear\n\n[Bridge]\nEndless horizon meets my eyes\nWhere the sea and sky collide\n\n[Verse 4]\nMoonlight dances on the waves\nIn the ocean's arms we lay",
        "gpt_description_prompt": null,
        "audio_prompt_id": null,
        "history": null,
        "concat_history": null,
        "type": "gen",
        "duration": null,
        "refund_credits": null,
        "stream": true,
        "infill": null,
        "error_type": null,
        "error_message": null
    },
    "major_model_version": "v3",
    "status": "complete",
    "created_at": "2024-06-06T02:21:26.168Z",
    "batch_size": 1
}
 {
    "id": "8fb0a232-aef3-4f8a-82ad-72a3fde0bcc6",
    "clips": [
        {
            "id": "e9f2a77a-07d7-444a-a1f7-575477b0ff18",
            "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": "infectious house",
                "prompt": "[Verse]\nBlue waves crashing on the shore\nSunshine smiling evermore\n\n[Verse 2]\nSailboats drifting far from land\nSalt and sand go hand in hand\n\n[Chorus]\nOh the ocean holds my dreams\nIn its tide sun's golden beams\nLet the sea set me free\nIn its waves I find my peace\n\n[Verse 3]\nSeagulls flying by the pier\nWhispers of the water clear\n\n[Bridge]\nEndless horizon meets my eyes\nWhere the sea and sky collide\n\n[Verse 4]\nMoonlight dances on the waves\nIn the ocean's arms we lay",
                "gpt_description_prompt": null,
                "audio_prompt_id": null,
                "history": null,
                "concat_history": null,
                "type": "gen",
                "duration": null,
                "refund_credits": null,
                "stream": true,
                "infill": null,
                "error_type": null,
                "error_message": null
            },
            "is_liked": false,
            "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
            "display_name": "MercurialMetronomes303",
            "handle": "mercurialmetronomes303",
            "is_handle_updated": false,
            "avatar_image_url": null,
            "is_trashed": false,
            "reaction": null,
            "created_at": "2024-06-06T02:21:26.175Z",
            "status": "submitted",
            "title": "大海",
            "play_count": 0,
            "upvote_count": 0,
            "is_public": false
        },
        {
            "id": "399f0745-0168-463c-a18a-f681f5711280",
            "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": "infectious house",
                "prompt": "[Verse]\nBlue waves crashing on the shore\nSunshine smiling evermore\n\n[Verse 2]\nSailboats drifting far from land\nSalt and sand go hand in hand\n\n[Chorus]\nOh the ocean holds my dreams\nIn its tide sun's golden beams\nLet the sea set me free\nIn its waves I find my peace\n\n[Verse 3]\nSeagulls flying by the pier\nWhispers of the water clear\n\n[Bridge]\nEndless horizon meets my eyes\nWhere the sea and sky collide\n\n[Verse 4]\nMoonlight dances on the waves\nIn the ocean's arms we lay",
                "gpt_description_prompt": null,
                "audio_prompt_id": null,
                "history": null,
                "concat_history": null,
                "type": "gen",
                "duration": null,
                "refund_credits": null,
                "stream": true,
                "infill": null,
                "error_type": null,
                "error_message": null
            },
            "is_liked": false,
            "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
            "display_name": "MercurialMetronomes303",
            "handle": "mercurialmetronomes303",
            "is_handle_updated": false,
            "avatar_image_url": null,
            "is_trashed": false,
            "reaction": null,
            "created_at": "2024-06-06T02:21:26.176Z",
            "status": "submitted",
            "title": "大海",
            "play_count": 0,
            "upvote_count": 0,
            "is_public": false
        }
    ],
    "metadata": {
        "tags": "infectious house",
        "prompt": "[Verse]\nBlue waves crashing on the shore\nSunshine smiling evermore\n\n[Verse 2]\nSailboats drifting far from land\nSalt and sand go hand in hand\n\n[Chorus]\nOh the ocean holds my dreams\nIn its tide sun's golden beams\nLet the sea set me free\nIn its waves I find my peace\n\n[Verse 3]\nSeagulls flying by the pier\nWhispers of the water clear\n\n[Bridge]\nEndless horizon meets my eyes\nWhere the sea and sky collide\n\n[Verse 4]\nMoonlight dances on the waves\nIn the ocean's arms we lay",
        "gpt_description_prompt": null,
        "audio_prompt_id": null,
        "history": null,
        "concat_history": null,
        "type": "gen",
        "duration": null,
        "refund_credits": null,
        "stream": true,
        "infill": null,
        "error_type": null,
        "error_message": null
    },
    "major_model_version": "v3",
    "status": "complete",
    "created_at": "2024-06-06T02:21:26.168Z",
    "batch_size": 1
}

创建歌曲任务.描述模型

post https://api.openai-hk.com/sunoapi/generate/description-mode

请求体

json
{
  "gpt_description_prompt": "描述内容",
  "make_instrumental": false,
  "mv": "chirp-v3-5",
  "prompt": "描述内容2"
}
{
  "gpt_description_prompt": "描述内容",
  "make_instrumental": false,
  "mv": "chirp-v3-5",
  "prompt": "描述内容2"
}

返回

json
{
    "id": "344ec7d6-c976-4100-9804-f348bbf38422",
    "clips": [
        {
            "id": "0c60de63-fba7-4207-94ea-6a240c64f928",
            "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": null,
                "prompt": "大海",
                "gpt_description_prompt": "大海",
                "audio_prompt_id": null,
                "history": null,
                "concat_history": null,
                "type": "gen",
                "duration": null,
                "refund_credits": null,
                "stream": true,
                "infill": null,
                "error_type": null,
                "error_message": null
            },
            "is_liked": false,
            "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
            "display_name": "MercurialMetronomes303",
            "handle": "mercurialmetronomes303",
            "is_handle_updated": false,
            "avatar_image_url": null,
            "is_trashed": false,
            "reaction": null,
            "created_at": "2024-06-06T02:17:12.340Z",
            "status": "submitted",
            "title": "",
            "play_count": 0,
            "upvote_count": 0,
            "is_public": false
        },
        {
            "id": "28f4a72c-6a50-452f-a67c-5ab2354512c7",
            "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": null,
                "prompt": "大海",
                "gpt_description_prompt": "大海",
                "audio_prompt_id": null,
                "history": null,
                "concat_history": null,
                "type": "gen",
                "duration": null,
                "refund_credits": null,
                "stream": true,
                "infill": null,
                "error_type": null,
                "error_message": null
            },
            "is_liked": false,
            "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
            "display_name": "MercurialMetronomes303",
            "handle": "mercurialmetronomes303",
            "is_handle_updated": false,
            "avatar_image_url": null,
            "is_trashed": false,
            "reaction": null,
            "created_at": "2024-06-06T02:17:12.340Z",
            "status": "submitted",
            "title": "",
            "play_count": 0,
            "upvote_count": 0,
            "is_public": false
        }
    ],
    "metadata": {
        "tags": null,
        "prompt": "大海",
        "gpt_description_prompt": "大海",
        "audio_prompt_id": null,
        "history": null,
        "concat_history": null,
        "type": "gen",
        "duration": null,
        "refund_credits": null,
        "stream": true,
        "infill": null,
        "error_type": null,
        "error_message": null
    },
    "major_model_version": "v3",
    "status": "complete",
    "created_at": "2024-06-06T02:17:12.330Z",
    "batch_size": 1
}
{
    "id": "344ec7d6-c976-4100-9804-f348bbf38422",
    "clips": [
        {
            "id": "0c60de63-fba7-4207-94ea-6a240c64f928",
            "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": null,
                "prompt": "大海",
                "gpt_description_prompt": "大海",
                "audio_prompt_id": null,
                "history": null,
                "concat_history": null,
                "type": "gen",
                "duration": null,
                "refund_credits": null,
                "stream": true,
                "infill": null,
                "error_type": null,
                "error_message": null
            },
            "is_liked": false,
            "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
            "display_name": "MercurialMetronomes303",
            "handle": "mercurialmetronomes303",
            "is_handle_updated": false,
            "avatar_image_url": null,
            "is_trashed": false,
            "reaction": null,
            "created_at": "2024-06-06T02:17:12.340Z",
            "status": "submitted",
            "title": "",
            "play_count": 0,
            "upvote_count": 0,
            "is_public": false
        },
        {
            "id": "28f4a72c-6a50-452f-a67c-5ab2354512c7",
            "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": null,
                "prompt": "大海",
                "gpt_description_prompt": "大海",
                "audio_prompt_id": null,
                "history": null,
                "concat_history": null,
                "type": "gen",
                "duration": null,
                "refund_credits": null,
                "stream": true,
                "infill": null,
                "error_type": null,
                "error_message": null
            },
            "is_liked": false,
            "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
            "display_name": "MercurialMetronomes303",
            "handle": "mercurialmetronomes303",
            "is_handle_updated": false,
            "avatar_image_url": null,
            "is_trashed": false,
            "reaction": null,
            "created_at": "2024-06-06T02:17:12.340Z",
            "status": "submitted",
            "title": "",
            "play_count": 0,
            "upvote_count": 0,
            "is_public": false
        }
    ],
    "metadata": {
        "tags": null,
        "prompt": "大海",
        "gpt_description_prompt": "大海",
        "audio_prompt_id": null,
        "history": null,
        "concat_history": null,
        "type": "gen",
        "duration": null,
        "refund_credits": null,
        "stream": true,
        "infill": null,
        "error_type": null,
        "error_message": null
    },
    "major_model_version": "v3",
    "status": "complete",
    "created_at": "2024-06-06T02:17:12.330Z",
    "batch_size": 1
}

获取歌曲

通过上面返回的都能返回2个id,2个ID

get https://api.openai-hk.com/sunoapi/feed/id1,id2

返回

json
[
    {
        "id": "e9f2a77a-07d7-444a-a1f7-575477b0ff18",
        "video_url": "",
        "audio_url": "https://audiopipe.suno.ai/?item_id=e9f2a77a-07d7-444a-a1f7-575477b0ff18",
        "image_url": "https://cdn1.suno.ai/image_e9f2a77a-07d7-444a-a1f7-575477b0ff18.png",
        "image_large_url": "https://cdn1.suno.ai/image_large_e9f2a77a-07d7-444a-a1f7-575477b0ff18.png",
        "is_video_pending": false,
        "major_model_version": "v3",
        "model_name": "chirp-v3",
        "metadata": {
            "tags": "infectious house",
            "prompt": "[Verse]\nBlue waves crashing on the shore\nSunshine smiling evermore\n\n[Verse 2]\nSailboats drifting far from land\nSalt and sand go hand in hand\n\n[Chorus]\nOh the ocean holds my dreams\nIn its tide sun's golden beams\nLet the sea set me free\nIn its waves I find my peace\n\n[Verse 3]\nSeagulls flying by the pier\nWhispers of the water clear\n\n[Bridge]\nEndless horizon meets my eyes\nWhere the sea and sky collide\n\n[Verse 4]\nMoonlight dances on the waves\nIn the ocean's arms we lay",
            "gpt_description_prompt": null,
            "audio_prompt_id": null,
            "history": null,
            "concat_history": null,
            "type": "gen",
            "duration": null,
            "refund_credits": null,
            "stream": true,
            "infill": null,
            "error_type": null,
            "error_message": null
        },
        "is_liked": false,
        "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
        "display_name": "MercurialMetronomes303",
        "handle": "mercurialmetronomes303",
        "is_handle_updated": false,
        "avatar_image_url": null,
        "is_trashed": false,
        "reaction": null,
        "created_at": "2024-06-06T02:21:26.175Z",
        "status": "streaming",
        "title": "大海",
        "play_count": 0,
        "upvote_count": 0,
        "is_public": false
    },
    {
        "id": "399f0745-0168-463c-a18a-f681f5711280",
        "video_url": "",
        "audio_url": "https://audiopipe.suno.ai/?item_id=399f0745-0168-463c-a18a-f681f5711280",
        "image_url": "https://cdn1.suno.ai/image_399f0745-0168-463c-a18a-f681f5711280.png",
        "image_large_url": "https://cdn1.suno.ai/image_large_399f0745-0168-463c-a18a-f681f5711280.png",
        "is_video_pending": false,
        "major_model_version": "v3",
        "model_name": "chirp-v3",
        "metadata": {
            "tags": "infectious house",
            "prompt": "[Verse]\nBlue waves crashing on the shore\nSunshine smiling evermore\n\n[Verse 2]\nSailboats drifting far from land\nSalt and sand go hand in hand\n\n[Chorus]\nOh the ocean holds my dreams\nIn its tide sun's golden beams\nLet the sea set me free\nIn its waves I find my peace\n\n[Verse 3]\nSeagulls flying by the pier\nWhispers of the water clear\n\n[Bridge]\nEndless horizon meets my eyes\nWhere the sea and sky collide\n\n[Verse 4]\nMoonlight dances on the waves\nIn the ocean's arms we lay",
            "gpt_description_prompt": null,
            "audio_prompt_id": null,
            "history": null,
            "concat_history": null,
            "type": "gen",
            "duration": null,
            "refund_credits": null,
            "stream": true,
            "infill": null,
            "error_type": null,
            "error_message": null
        },
        "is_liked": false,
        "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
        "display_name": "MercurialMetronomes303",
        "handle": "mercurialmetronomes303",
        "is_handle_updated": false,
        "avatar_image_url": null,
        "is_trashed": false,
        "reaction": null,
        "created_at": "2024-06-06T02:21:26.176Z",
        "status": "streaming",
        "title": "大海",
        "play_count": 0,
        "upvote_count": 0,
        "is_public": false
    }
]
[
    {
        "id": "e9f2a77a-07d7-444a-a1f7-575477b0ff18",
        "video_url": "",
        "audio_url": "https://audiopipe.suno.ai/?item_id=e9f2a77a-07d7-444a-a1f7-575477b0ff18",
        "image_url": "https://cdn1.suno.ai/image_e9f2a77a-07d7-444a-a1f7-575477b0ff18.png",
        "image_large_url": "https://cdn1.suno.ai/image_large_e9f2a77a-07d7-444a-a1f7-575477b0ff18.png",
        "is_video_pending": false,
        "major_model_version": "v3",
        "model_name": "chirp-v3",
        "metadata": {
            "tags": "infectious house",
            "prompt": "[Verse]\nBlue waves crashing on the shore\nSunshine smiling evermore\n\n[Verse 2]\nSailboats drifting far from land\nSalt and sand go hand in hand\n\n[Chorus]\nOh the ocean holds my dreams\nIn its tide sun's golden beams\nLet the sea set me free\nIn its waves I find my peace\n\n[Verse 3]\nSeagulls flying by the pier\nWhispers of the water clear\n\n[Bridge]\nEndless horizon meets my eyes\nWhere the sea and sky collide\n\n[Verse 4]\nMoonlight dances on the waves\nIn the ocean's arms we lay",
            "gpt_description_prompt": null,
            "audio_prompt_id": null,
            "history": null,
            "concat_history": null,
            "type": "gen",
            "duration": null,
            "refund_credits": null,
            "stream": true,
            "infill": null,
            "error_type": null,
            "error_message": null
        },
        "is_liked": false,
        "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
        "display_name": "MercurialMetronomes303",
        "handle": "mercurialmetronomes303",
        "is_handle_updated": false,
        "avatar_image_url": null,
        "is_trashed": false,
        "reaction": null,
        "created_at": "2024-06-06T02:21:26.175Z",
        "status": "streaming",
        "title": "大海",
        "play_count": 0,
        "upvote_count": 0,
        "is_public": false
    },
    {
        "id": "399f0745-0168-463c-a18a-f681f5711280",
        "video_url": "",
        "audio_url": "https://audiopipe.suno.ai/?item_id=399f0745-0168-463c-a18a-f681f5711280",
        "image_url": "https://cdn1.suno.ai/image_399f0745-0168-463c-a18a-f681f5711280.png",
        "image_large_url": "https://cdn1.suno.ai/image_large_399f0745-0168-463c-a18a-f681f5711280.png",
        "is_video_pending": false,
        "major_model_version": "v3",
        "model_name": "chirp-v3",
        "metadata": {
            "tags": "infectious house",
            "prompt": "[Verse]\nBlue waves crashing on the shore\nSunshine smiling evermore\n\n[Verse 2]\nSailboats drifting far from land\nSalt and sand go hand in hand\n\n[Chorus]\nOh the ocean holds my dreams\nIn its tide sun's golden beams\nLet the sea set me free\nIn its waves I find my peace\n\n[Verse 3]\nSeagulls flying by the pier\nWhispers of the water clear\n\n[Bridge]\nEndless horizon meets my eyes\nWhere the sea and sky collide\n\n[Verse 4]\nMoonlight dances on the waves\nIn the ocean's arms we lay",
            "gpt_description_prompt": null,
            "audio_prompt_id": null,
            "history": null,
            "concat_history": null,
            "type": "gen",
            "duration": null,
            "refund_credits": null,
            "stream": true,
            "infill": null,
            "error_type": null,
            "error_message": null
        },
        "is_liked": false,
        "user_id": "f60cf781-3c2e-4000-918c-73f68de2a28c",
        "display_name": "MercurialMetronomes303",
        "handle": "mercurialmetronomes303",
        "is_handle_updated": false,
        "avatar_image_url": null,
        "is_trashed": false,
        "reaction": null,
        "created_at": "2024-06-06T02:21:26.176Z",
        "status": "streaming",
        "title": "大海",
        "play_count": 0,
        "upvote_count": 0,
        "is_public": false
    }
]

主要还是看 [0].status 当值为complete 表示完成

音频生成音频

尝试可以在 https://suno.ddaiai.com 测试; 下面是效果图

suno

API有6个步骤

1.上传请求

post https://api.openai-hk.com/sunoapi/uploads/audio

请求体

json
{"extension":"mp3"}
{"extension":"mp3"}

返回

json
{
	"id": "c25a8c59-000a-481f-ac28-efde2dc9e677",
	"url": "https://suno-uploads.s3.amazonaws.com/",
	"fields": {
		"Content-Type": "audio/mpeg",
		"key": "raw_uploads/c25a8c59-000a-481f-ac28-efde2dc9e677.mp3",
		"AWSAccessKeyId": "AKIA2V4GXGDKJMTPWLXO",
		"policy": "eyJleHBpcmF0aW9uIjogIjIwMjQtMDYtMTdUMDY6MTg6MzJaIiwgImNvbmRpdGlvbnMiOiBbWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsIDAsIDEwNDg1NzYwMF0sIFsic3RhcnRzLXdpdGgiLCAiJENvbnRlbnQtVHlwZSIsICJhdWRpby9tcGVnIl0sIHsiYnVja2V0IjogInN1bm8tdXBsb2FkcyJ9LCB7ImtleSI6ICJyYXdfdXBsb2Fkcy9jMjVhOGM1OS0wMDBhLTQ4MWYtYWMyOC1lZmRlMmRjOWU2NzcubXAzIn1dfQ==",
		"signature": "yjfB/HTNgPHURNLRdeizNMVgG6k="
	}
}
{
	"id": "c25a8c59-000a-481f-ac28-efde2dc9e677",
	"url": "https://suno-uploads.s3.amazonaws.com/",
	"fields": {
		"Content-Type": "audio/mpeg",
		"key": "raw_uploads/c25a8c59-000a-481f-ac28-efde2dc9e677.mp3",
		"AWSAccessKeyId": "AKIA2V4GXGDKJMTPWLXO",
		"policy": "eyJleHBpcmF0aW9uIjogIjIwMjQtMDYtMTdUMDY6MTg6MzJaIiwgImNvbmRpdGlvbnMiOiBbWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsIDAsIDEwNDg1NzYwMF0sIFsic3RhcnRzLXdpdGgiLCAiJENvbnRlbnQtVHlwZSIsICJhdWRpby9tcGVnIl0sIHsiYnVja2V0IjogInN1bm8tdXBsb2FkcyJ9LCB7ImtleSI6ICJyYXdfdXBsb2Fkcy9jMjVhOGM1OS0wMDBhLTQ4MWYtYWMyOC1lZmRlMmRjOWU2NzcubXAzIn1dfQ==",
		"signature": "yjfB/HTNgPHURNLRdeizNMVgG6k="
	}
}

这里的 id 是下文的 audio_id, 同时 url 是第二步的请求URL

2.上传文件

post https://suno-uploads.s3.amazonaws.com/

shell
curl --request POST \
  --url https://suno-uploads.s3.amazonaws.com/ \
  --header 'content-type: multipart/form-data' \
  --form Content-Type=audio/mpeg \
  --form key=raw_uploads/c25a8c59-000a-481f-ac28-efde2dc9e677.mp3 \
  --form AWSAccessKeyId=AKIA2V4GXGDKJMTPWLXO \
  --form policy=eyJleHBpcmF0aW9uIjogIjIwMjQtMDYtMTdUMDY6MTg6MzJaIiwgImNvbmRpdGlvbnMiOiBbWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsIDAsIDEwNDg1NzYwMF0sIFsic3RhcnRzLXdpdGgiLCAiJENvbnRlbnQtVHlwZSIsICJhdWRpby9tcGVnIl0sIHsiYnVja2V0IjogInN1bm8tdXBsb2FkcyJ9LCB7ImtleSI6ICJyYXdfdXBsb2Fkcy9jMjVhOGM1OS0wMDBhLTQ4MWYtYWMyOC1lZmRlMmRjOWU2NzcubXAzIn1dfQ== \
  --form signature=yjfB/HTNgPHURNLRdeizNMVgG6k= \
  --form file=@/you_mp3_dir_file.mp3
curl --request POST \
  --url https://suno-uploads.s3.amazonaws.com/ \
  --header 'content-type: multipart/form-data' \
  --form Content-Type=audio/mpeg \
  --form key=raw_uploads/c25a8c59-000a-481f-ac28-efde2dc9e677.mp3 \
  --form AWSAccessKeyId=AKIA2V4GXGDKJMTPWLXO \
  --form policy=eyJleHBpcmF0aW9uIjogIjIwMjQtMDYtMTdUMDY6MTg6MzJaIiwgImNvbmRpdGlvbnMiOiBbWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsIDAsIDEwNDg1NzYwMF0sIFsic3RhcnRzLXdpdGgiLCAiJENvbnRlbnQtVHlwZSIsICJhdWRpby9tcGVnIl0sIHsiYnVja2V0IjogInN1bm8tdXBsb2FkcyJ9LCB7ImtleSI6ICJyYXdfdXBsb2Fkcy9jMjVhOGM1OS0wMDBhLTQ4MWYtYWMyOC1lZmRlMmRjOWU2NzcubXAzIn1dfQ== \
  --form signature=yjfB/HTNgPHURNLRdeizNMVgG6k= \
  --form file=@/you_mp3_dir_file.mp3
  • 请求体由上面的fieldsfile的mp3文件
  • 返回 20x就表示成功

3.报告上传完毕

post https://api.openai-hk.com/sunoapi/uploads/audio/{id}/upload-finish

请求体

json
{"upload_type":"file_upload","upload_filename":"you_mp3_name.mp3"}
{"upload_type":"file_upload","upload_filename":"you_mp3_name.mp3"}

4.查询处理状态

get https://api.openai-hk.com/sunoapi/uploads/audio/{id}

返回体

json
{
	"id": "c25a8c59-000a-481f-ac28-efde2dc9e677",
	"status": "complete",
	"error_message": null,
	"s3_id": "m_05c9b477-4519-4810-9ffa-00580c082067",
	"title": "S-100096-100096-84069F8B",
	"image_url": "https://cdn1.suno.ai/image_05c9b477-4519-4810-9ffa-00580c082067.png"
}
{
	"id": "c25a8c59-000a-481f-ac28-efde2dc9e677",
	"status": "complete",
	"error_message": null,
	"s3_id": "m_05c9b477-4519-4810-9ffa-00580c082067",
	"title": "S-100096-100096-84069F8B",
	"image_url": "https://cdn1.suno.ai/image_05c9b477-4519-4810-9ffa-00580c082067.png"
}

status 当为 complete 时表示完成

5.初始化音频文件

post https://api.openai-hk.com/sunoapi/uploads/audio/{id}/initialize-clip

请求体

json
{}
{}

返回体

json
{
	"clip_id": "05c9b477-4519-4810-9ffa-00580c082067"
}
{
	"clip_id": "05c9b477-4519-4810-9ffa-00580c082067"
}

6.获取与进行二次创作