- 介绍
- 项目说明
- 身份验证
- 发出请求
- 支持模型(模型及费率一览表)
- openai api
- Claude
- 视频接口
- kling(官方格式)
- luma
- CogVideoX(官方格式)
- runway(开发中)
- sora
- 音乐接口
- 图片接口
生成音乐
POST
https://api.openai-core.com/suno/v1/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/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-09 04:25:44