MAPI
音频(Audio)Suno

添加伴奏

给现有人声或音轨叠加伴奏。源必须来自 suno-upload,用 task_id + audio_index(1-based,默认 1)引用音轨。普通生成任务不能作源。

custom 决定哪些字段生效。已提交字段无论当前模式是否生效,都须满足类型、范围和长度。不传 custom 时按此推断:有 prompt → true;无 prompt 但有 gpt_description → false;否则有 tags 或 title → true。

  • custom=true 时 prompt、title、tags、negative_tags、style_weight、weirdness、audio_weight 生效,gpt_description 被忽略。custom=false 时只读 gpt_description(必填,缺失提交期 400、不扣费)。vocal_gender 两种模式都生效。
  • version:v6 / v6-wild / v6-mini,省略默认 v6。使用 custom_model_id 时省略。custom_model_id 与 version 互斥。
  • 不支持 auto_lyrics、persona_id、instrumental、目标时长。max_mode 启用要求自定义模式,按普通售价的 2 倍计费。创意度用 weirdness,兼容旧名 weirdness_constraint。
  • 提交接口:POST /v1/music/generations,model: "suno-add-instrumental"。
  • 任务查询: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-add-instrumental。

task_id*string

suno-upload 上传任务的 ID,必填。普通生成任务不能使用;缺失或无法解析源时提交期直接返回 400。

audio_index?integer

源任务结果 music[] 中的第几首(1-based,默认 1;一次上传通常 2 首:索引 1 与 2)。

Default1
Range1 <= value
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 互斥。

custom?boolean

true 为自定义模式,prompt 作歌词;false 为灵感模式,用 gpt_description。省略时按内容推断:有 prompt → true;无 prompt 但有 gpt_description → false;否则有 tags 或 title → true。

prompt?string

歌词。仅 custom=true 时生效,灵感模式下被忽略。

gpt_description?string

灵感提示词。custom=false 时必填,缺失提交期直接返回 400、不扣费。custom=true 时被忽略。

title?string

标题。仅 custom=true 时生效。

tags?string

风格标签。仅 custom=true 时生效。

negative_tags?string

要排除的风格标签。仅 custom=true 时生效。

style_weight?number

风格权重,范围 0.00–1.00。越界提交期直接返回 400。仅 custom=true 时生效。

Range0 <= value <= 1
weirdness?number

创意权重,范围 0.00–1.00。兼容旧名 weirdness_constraint;新请求请使用 weirdness。

Range0 <= value <= 1
audio_weight?number

音频权重,范围 0.00–1.00。仅 custom=true 时生效。

Range0 <= value <= 1
vocal_gender?string

人声性别:Male / Female。两种模式都生效。

Value in"Male" | "Female"
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-add-instrumental",    "task_id": "task_01ABC",    "audio_index": 1,    "version": "v6",    "tags": "lo-fi"  }'
{
  "code": 200,
  "message": "success",
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}
{
  "code": "invalid_request",
  "message": "task_id is required",
  "data": null
}

最后更新于