MAPI
AudioSuno

Create Mashup

Mash up two existing songs. task_ids must contain exactly 2 IDs; optional audio_indexes is parallel (default 1).

Submitted fields are validated even if unused. gpt_description is required when custom=false. prompt is required when custom=true and instrumental=false.

  • version: v6 / v6-wild / v6-mini, default v6. custom_model_id is mutually exclusive with version and persona_id.
  • Target duration is not supported. max_mode requires custom mode and bills at 2×.
POST
/v1/music/generations

Authorization

BearerAuth

AuthorizationBearer <token>

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

In: header

Request Body

application/json

model*string

固定填写 suno-mashup。

task_ids*array<string>

2 个源音轨所属任务的 ID,须恰好 2 个。数量不对提交期直接返回 400。

Items2 <= items <= 2
audio_indexes?array<integer>

与 task_ids 平行,指定各任务取结果 music[] 第几首(1-based,默认都取 1)。

instrumental?boolean

是否纯器乐。true 表示无人声;省略默认 false(要人声)。

Defaultfalse
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

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

prompt?string

歌词。custom=true 且 instrumental=false 时必填。灵感模式下不生效,但已提交值仍须满足长度要求。

gpt_description?string

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

title?string

标题。仅 custom=true 时生效。

tags?string

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

negative_tags?string

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

auto_lyrics?boolean

是否对输入歌词进行二次创作。仅 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"
persona_id?string

Persona 风格 ID。仅 custom=true 时生效,与 custom_model_id 互斥。

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-mashup",    "task_ids": [      "task_01ABC",      "task_01DEF"    ],    "audio_indexes": [      1,      2    ],    "custom": true,    "prompt": "upbeat mashup of the two tracks"  }'
{
  "code": 200,
  "message": "success",
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}
{
  "code": "invalid_request",
  "message": "mashup requires exactly 2 task_ids, got 1",
  "data": null
}

Last updated on