curl --request POST \
--url https://api.apimart.ai/v1/music/generations/uploadCover \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno",
"version": "v6",
"audio_url": "https://example.com/reference.mp3",
"custom": true,
"instrumental": true,
"tags": "piano, ambient",
"duration_s": 120,
"variety": "normal",
"audio_format": "m4a"
}'
import requests
response = requests.post(
"https://api.apimart.ai/v1/music/generations/uploadCover",
headers={"Authorization": "Bearer <token>"},
json={
"model": "suno",
"version": "v6",
"audio_url": "https://example.com/reference.mp3",
"custom": True,
"instrumental": True,
"tags": "piano, ambient",
"duration_s": 120,
"audio_format": "m4a",
},
)
print(response.json())
const response = await fetch("https://api.apimart.ai/v1/music/generations/uploadCover", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "suno",
version: "v6",
audio_url: "https://example.com/reference.mp3",
custom: true,
instrumental: true,
tags: "piano, ambient",
duration_s: 120,
audio_format: "m4a"
})
});
console.log(await response.json());
{
"code": 200,
"data": [
{"status": "submitted", "task_id": "task_01M24YMN4EV04M84R5QYM77R1E"}
]
}
Suno
上传音频并翻唱
上传公网音频 URL,并使用 Suno V6 生成翻唱版本
POST
/
v1
/
music
/
generations
/
uploadCover
curl --request POST \
--url https://api.apimart.ai/v1/music/generations/uploadCover \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno",
"version": "v6",
"audio_url": "https://example.com/reference.mp3",
"custom": true,
"instrumental": true,
"tags": "piano, ambient",
"duration_s": 120,
"variety": "normal",
"audio_format": "m4a"
}'
import requests
response = requests.post(
"https://api.apimart.ai/v1/music/generations/uploadCover",
headers={"Authorization": "Bearer <token>"},
json={
"model": "suno",
"version": "v6",
"audio_url": "https://example.com/reference.mp3",
"custom": True,
"instrumental": True,
"tags": "piano, ambient",
"duration_s": 120,
"audio_format": "m4a",
},
)
print(response.json())
const response = await fetch("https://api.apimart.ai/v1/music/generations/uploadCover", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "suno",
version: "v6",
audio_url: "https://example.com/reference.mp3",
custom: true,
instrumental: true,
tags: "piano, ambient",
duration_s: 120,
audio_format: "m4a"
})
});
console.log(await response.json());
{
"code": 200,
"data": [
{"status": "submitted", "task_id": "task_01M24YMN4EV04M84R5QYM77R1E"}
]
}
本接口直接使用公开音频 URL 生成翻唱,无需先调用
uploadTask。提交后返回 task_id,通过 GET /v1/music/tasks/{task_id} 查询结果。curl --request POST \
--url https://api.apimart.ai/v1/music/generations/uploadCover \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno",
"version": "v6",
"audio_url": "https://example.com/reference.mp3",
"custom": true,
"instrumental": true,
"tags": "piano, ambient",
"duration_s": 120,
"variety": "normal",
"audio_format": "m4a"
}'
import requests
response = requests.post(
"https://api.apimart.ai/v1/music/generations/uploadCover",
headers={"Authorization": "Bearer <token>"},
json={
"model": "suno",
"version": "v6",
"audio_url": "https://example.com/reference.mp3",
"custom": True,
"instrumental": True,
"tags": "piano, ambient",
"duration_s": 120,
"audio_format": "m4a",
},
)
print(response.json())
const response = await fetch("https://api.apimart.ai/v1/music/generations/uploadCover", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "suno",
version: "v6",
audio_url: "https://example.com/reference.mp3",
custom: true,
instrumental: true,
tags: "piano, ambient",
duration_s: 120,
audio_format: "m4a"
})
});
console.log(await response.json());
Authorizations
string
必填
Bearer Token。访问 API Key 管理页面 获取 API Key。
Body
string
默认值:"suno"
固定使用
suno。string
必填
公网可访问的 HTTP(S) 音频直链,建议原音频不超过 8 分钟。本地路径、
blob: URL 和需要登录的页面链接不可用。string
默认值:"v6"
公共版本:
v6 / v6-wild / v6-mini。使用 custom_model_id 时省略。string
创建模型任务返回的完整 UUID。与
version、persona_id 互斥。boolean
建议显式发送。
false 使用 gpt_description;true 使用歌词和风格字段。boolean
默认值:"false"
是否生成纯音乐。
custom=true 且本字段为 false 时,prompt 必填。string
灵感描述,
custom=false 时必填,不超过 3000 个字符。string
自定义模式歌词,不超过 5000 个字符。
string
风格描述,不超过 1000 个字符。
string
标题,不超过 80 个字符。
string
不希望出现的风格。
number
风格权重,范围 0–1。
number
创意度权重,范围 0–1。
number
音频权重,范围 0–1。
boolean
是否对输入歌词进行二次创作。
string
人声性别:
Male / Female。string
Persona ID,与
custom_model_id 互斥。integer
目标生成时长,范围 10–360 秒,仅自定义模式可用。
string
风格变化程度:
off / normal / high / extra / max。boolean
默认值:"false"
是否启用 Max 模式。启用时要求自定义模式,并按普通售价的 2 倍计费。
string
输出格式:
mp3 / m4a / wav。Response
integer
响应状态码。
array
提交结果,读取
data[0].task_id 并轮询任务查询接口。{
"code": 200,
"data": [
{"status": "submitted", "task_id": "task_01M24YMN4EV04M84R5QYM77R1E"}
]
}