openai-core中文文档
  1. v3.0
openai-core中文文档
  • 介绍
  • 项目说明
  • 身份验证
  • 发出请求
  • 支持模型(模型及费率一览表)
  • openai api
    • 介绍
    • 导言
    • RealTime 实时语音对话服务
    • gpts
      • gpts介绍
      • GPTS对话
      • 搜索相关 GPTs
    • 图像(Images)
      • README
      • 图像对象
      • 创建图像
      • 创建图片编辑
      • 创建图像变体
    • 嵌入(Embeddings)
      • 嵌入对象
      • 创建嵌入
    • 自动补全(Completions)
      • 完成对象
      • 创建完成
    • 聊天(Chat)
      • 聊天完成对象
      • 聊天完成块对象
      • 创建聊天补全
    • 音频(Audio)
      • 创建语音
      • 创建转录
      • 创建翻译
  • Claude
    • claude-3接入说明
    • 创建聊天(openai格式)
      POST
  • 视频接口
    • kling(官方格式)
      • 文生视频
      • 查询任务
      • 图生视频
    • luma
      • 免费版
        • 生成视频
        • 获取视频
      • 付费版(开发中)
        • 生成视频 Copy
    • CogVideoX(官方格式)
      • 生成(generations)
      • 查询(async-result)
    • runway(开发中)
      • 生成(generations) Copy
    • sora
      • openai格式
        • 生成视频
  • 音乐接口
    • suno
      • suno接入说明
      • GoAmzAI格式
        • v3.5
          • 生成音乐
          • 获取音乐
        • v3.0
          • 生成音乐
            POST
          • 获取音乐
            GET
          • 生成歌词
            POST
          • 歌词查询
            GET
      • openai格式
        • 生成音乐
  • 图片接口
    • midjourney
      • Midjourney接入说明
      • 任务查询
        • 根据ID列表查询任务
        • 指定ID获取任务
        • 获取任务图片的seed
      • 提交swap_face任务(换脸)
      • 绘图变化(UPSCALE; VARIATION; REROLL)
      • 执行动作(所有的关联按钮动作UPSCALE; VARIATION; REROLL; ZOOM等)
      • 绘图变化-simple(UPSCALE; VARIATION; REROLL)
      • 提交Blend任务(图生图)
      • 提交Describe任务(图生文)
      • 提交Imagine任务(文生图、文图生图)
      • 提交Modal(提交局部重绘、ZOOM)
      • 提交Shorten任务(prompt分析)
    • flux(开发中)
      • 生成图像(image)
      • 查询任务(get_result)
  1. v3.0

生成音乐

POST
https://api.openai-core.com/suno/v1/v3.0/music
给定一个提示,该模型将返回一个或多个预测的完成,并且还可以返回每个位置的替代标记的概率。
为提供的提示和参数创建完成

请求参数

Header 参数
Content-Type
string 
必需
示例值:
application/json
Accept
string 
必需
示例值:
application/json
Authorization
string 
必需
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
custom_mode
boolean 
必需
input
object 
必需
prompt
string 
必需
title
string 
必需
tags
string 
必需
continue_at
integer 
必需
continue_clip_id
string 
必需
示例
{
    "custom_mode": true,
    "input": {
        "prompt": "[Verse]\nTesla riding\nBatteries flying\nElon Musk\nHe's got the future on his mind\nSolar panels shining\nRockets reaching for the skies\nInnovation's flowing\nHe's the tech wizard of our times\n\n[Verse]\nNeuralink connecting minds\nAI running wild\nMars colonization\nHe's making it his style\nFrom PayPal he came and shook the world with his touch\nElon Musk\nThe eccentric genius\nHe's too much\n\n[Chorus]\nElon Musk\nHe's the man with electric dreams\nChanging the world with his technology schemes\nFrom PayPal to SpaceX\nHe's a force to be seen\nElectric cars and rockets\nHe's living the dream",
        "title": "Electric Dreams",
        "tags": "epic reggae",
        "continue_at": 0,
        "continue_clip_id": ""
    }
}

示例代码

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.openai-core.com/suno/v1/v3.0/music' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "custom_mode": true,
    "input": {
        "prompt": "[Verse]\nTesla riding\nBatteries flying\nElon Musk\nHe'\''s got the future on his mind\nSolar panels shining\nRockets reaching for the skies\nInnovation'\''s flowing\nHe'\''s the tech wizard of our times\n\n[Verse]\nNeuralink connecting minds\nAI running wild\nMars colonization\nHe'\''s making it his style\nFrom PayPal he came and shook the world with his touch\nElon Musk\nThe eccentric genius\nHe'\''s too much\n\n[Chorus]\nElon Musk\nHe'\''s the man with electric dreams\nChanging the world with his technology schemes\nFrom PayPal to SpaceX\nHe'\''s a force to be seen\nElectric cars and rockets\nHe'\''s living the dream",
        "title": "Electric Dreams",
        "tags": "epic reggae",
        "continue_at": 0,
        "continue_clip_id": ""
    }
}'

返回响应

🟢200OK
application/json
Body
code
integer 
必需
message
string 
必需
data
object 
必需
task_id
string 
必需
示例
{
    "code": 200,
    "message": "success",
    "data": {
        "task_id": "96bff3e6-5af6-490e-b0f3-f99257883383"
    }
}
修改于 2024-10-23 08:51:35
上一页
获取音乐
下一页
获取音乐
Built with