MAPI
音频(Audio)Suno

上传音频并翻唱

  • 直接用公网音频 URL 生成翻唱,无需先调用 suno-upload。

  • audio_url 必填(公网 HTTP(S) 直链,建议不超过 8 分钟)。不要传本地路径或 blob: URL。

  • version 仅支持 v6 / v6-wild / v6-mini,省略默认 v6。使用 custom_model_id 时省略 version;custom_model_id 与 persona_id 互斥。

  • 建议显式传 custom。custom=false 时 gpt_description 必填(不超过 3000 字);custom=true 且 instrumental=false 时 prompt 必填(不超过 5000 字)。

  • duration_s 仅自定义模式,范围 10–360 秒。max_mode=true 要求自定义模式,按普通售价的 2 倍计费。

  • 提交接口:统一通过 POST /v1/music/generations 提交,使用 model: "suno-upload-cover" 选择此能力。

  • 任务查询:提交返回 task_id,通过 GET /v1/music/generations/{task_id} 获取任务状态和结果。

POST
/v1/music/generations

Authorization

BearerAuth

AuthorizationBearer <token>

使用 MAPI Bearer Token 认证。格式:Authorization: Bearer sk-xxxxxx。

In: header

Request Body

application/json

model*string

固定填写 suno-upload-cover。

audio_url*string

公网可访问的 HTTP(S) 音频直链,建议原音频不超过 8 分钟。本地路径、blob: URL 和需要登录的页面链接不可用。

Formaturi
version?string

公共版本:v6 / v6-wild / v6-mini。省略默认 v6。使用 custom_model_id 时省略。

Default"v6"
Value in"v6" | "v6-wild" | "v6-mini"
custom_model_id?string

创建模型任务返回的完整 UUID。与 version、persona_id 互斥。

custom?boolean

建议显式发送。false 使用 gpt_description;true 使用歌词和风格字段。

instrumental?boolean

是否生成纯音乐。custom=true 且本字段为 false 时,prompt 必填。

Defaultfalse
gpt_description?string

灵感描述,custom=false 时必填,不超过 3000 个字符。

Lengthlength <= 3000
prompt?string

自定义模式歌词,不超过 5000 个字符。

Lengthlength <= 5000
tags?string

风格描述,不超过 1000 个字符。

Lengthlength <= 1000
title?string

标题,不超过 80 个字符。

Lengthlength <= 80
negative_tags?string

不希望出现的风格。

style_weight?number

风格权重,范围 0–1。

Range0 <= value <= 1
weirdness?number

创意度权重,范围 0–1。

Range0 <= value <= 1
audio_weight?number

音频权重,范围 0–1。

Range0 <= value <= 1
auto_lyrics?boolean

是否对输入歌词进行二次创作。

vocal_gender?string

人声性别:Male / Female。

Value in"Male" | "Female"
persona_id?string

Persona ID,与 custom_model_id 互斥。

duration_s?integer

目标生成时长,范围 10–360 秒,仅自定义模式可用。

Range10 <= value <= 360
variety?string

风格变化程度:off / normal / high / extra / max。

Value in"off" | "normal" | "high" | "extra" | "max"
max_mode?boolean

是否启用 Max 模式。启用时要求自定义模式,并按普通售价的 2 倍计费。

Defaultfalse
audio_format?string

输出格式:mp3 / m4a / wav。

Value in"mp3" | "m4a" | "wav"

Response Body

application/json

application/json

curl -X POST "https://loading/v1/music/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "suno-upload-cover",    "version": "v6",    "audio_url": "https://example.com/reference.mp3",    "custom": true,    "instrumental": true,    "tags": "piano, ambient",    "duration_s": 120,    "variety": "normal",    "audio_format": "m4a"  }'
{
  "code": 200,
  "message": "success",
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01M24YMN4EV04M84R5QYM77R1E"
    }
  ]
}
{
  "code": "invalid_request",
  "message": "audio_url is required",
  "data": null
}

最后更新于