xfusionai
  1. Suno Music
xfusionai
  • 产品介绍
  • 模型价格
  • 快速开始
  • Azure语音服务
  • Azure翻译服务
  • Azure open AI
  • 常见问题
  • OpenAI API
    • About OpenAI Compatible API
    • Chat
      • Chat Completion
    • Images
      • Create Image
    • Audio
      • Text To Speech API
  • Midjourney Open API
    • About Midjourney and Prices
    • Submit Imagine Task
      POST
    • Specify ID Query Task (fetch)
      GET
    • Specify the ID List Query Task
      GET
    • Obtain the seed of the Task Image
      GET
    • Specify ID Query Task
      GET
    • Submit Blend Task
      POST
    • Submit Modal Task
      POST
    • Submit Describe Task
      POST
    • Submit Shorten Task
      POST
    • Submit FaceSwap Task
      POST
    • Upload Files to Discord
      POST
    • Submit Action Task(All associated button actions UPSCALE; VARIATION; REROLL; ZOOM, etc.)
      POST
  • Luma video
    • Luma Task Creation
      POST
    • Luma Expand Video
      POST
    • Luma Query Task
      GET
    • Luma Download video
      GET
  • Suno Music
    • Generate music
      POST
    • Query task
      GET
  • Anthropic Claude
    • Claude Chat Completion
  • Flux API
    • Create Image
  1. Suno Music

Generate music

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/v1/chat/completions
Description: This endpoint is for custom creation mode with a high degree of freedom. This endpoint only submits a music generation task, and you need to check the result using the two song_id returned

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数
Content-Type
string 
可选
示例值:
application/json
Body 参数application/json
model
boolean 
必需
Model name
messages
object 
必需
title
string 
必需
Music Title
tags
string 
必需
Music style, separated by half width commas
prompt
string 
必需
Music creation prompts, including but not limited to lyrics]
continue_at
integer 
可选
Non mandatory parameter, to be used when continuing to create. The meaning is to continue creating from the second.
continue_clip_id
string 
可选
Non mandatory parameter, to be used when continuing to create. The meaning is, the ID of the song that needs to be continued to be created
示例
{
  "model": "suno-v3.5",
  "messages": [
    {
      "title": "The Unyielding Song of the Soul",
      "tags": ["Heartwarming", "Soulful", "Inspirational", "Indomitable"],
      "prompt": "This is a heartwarming and soul-stirring song that tells the story of a person who maintains a positive and optimistic attitude in the face of life's challenges and never gives up. The lyrics should reflect hope for the future and a love for life, with a melody that warms the heart and inspires listeners."
    }
  ]
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v1/chat/completions' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "suno-v3.5",
  "messages": [
    {
      "title": "The Unyielding Song of the Soul",
      "tags": ["Heartwarming", "Soulful", "Inspirational", "Indomitable"],
      "prompt": "This is a heartwarming and soul-stirring song that tells the story of a person who maintains a positive and optimistic attitude in the face of life'\''s challenges and never gives up. The lyrics should reflect hope for the future and a love for life, with a melody that warms the heart and inspires listeners."
    }
  ]
}'

返回响应

🟢200成功
application/json
Body
object {0}
示例
{
    "code": 0,
    "msg": "success",
    "data": [
        {
            "user_id": "sr4UcYbwlfOmIeYprAqd6L6LJCy2",
            "song_id": "1322a5ad-c23e-47fc-9550-fb540a43c3a3",
            "status": "submitted",
            "title": "The Unyielding Song of the Soul",
            "image_large_url": null,
            "image_url": null,
            "model_name": "chirp-v3",
            "video_url": "",
            "audio_url": "",
            "meta_tags": "Heartwarming, Soulful, Inspirational, Indomitable",
            "meta_prompt": "This is a heartwarming and soul-stirring song that tells the story of a person who maintains a positive and optimistic attitude in the face of life's challenges and never gives up. The lyrics should reflect hope for the future and a love for life, with a melody that warms the heart and inspires listeners.",
            "meta_duration": null,
            "meta_error_msg": null,
            "meta_error_type": null
        },
        {
            "user_id": "sr4UcYbwlfOmIeYprAqd6L6LJCy2",
            "song_id": "e9658339-c18b-41c9-a80a-491915f7ad9f",
            "status": "submitted",
            "title": "The Unyielding Song of the Soul",
            "image_large_url": null,
            "image_url": null,
            "model_name": "chirp-v3",
            "video_url": "",
            "audio_url": "",
            "meta_tags": "Heartwarming, Soulful, Inspirational, Indomitable",
            "meta_prompt": "This is a heartwarming and soul-stirring song that tells the story of a person who maintains a positive and optimistic attitude in the face of life's challenges and never gives up. The lyrics should reflect hope for the future and a love for life, with a melody that warms the heart and inspires listeners.",
            "meta_duration": null,
            "meta_error_msg": null,
            "meta_error_type": null
        }
    ]
}
修改于 2024-11-09 17:14:40
上一页
Luma Download video
下一页
Query task
Built with