# 混搭两首

**这是什么**：把两首歌混合成一首新的。

**什么时候用**：想把两首喜欢的歌合在一起时用。

## 接口地址
- POST `/api/cqt/generator/suno` (task: `mashup`)
- GET `/api/cqt/info/suno?id={taskId}`

## 请求参数
| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| task | string | 是 | 固定填 mashup |
| model | string | 是 | 模型版本（推荐 v6） |
| mashupClipIds | array | 是 | 要混搭的两个片段 ID（必须 2 个） |

## 请求示例
```bash
curl -X POST https://api.novapi.ai/api/cqt/generator/suno \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{ "task":"mashup", "model":"v6", "mashupClipIds":["e375e06c-d947-449b-9400-a4cba2bd8160","064bdc20-9c1e-4bfe-ac4c-9d95b85c0817"] }'
# -> { "code":200, "data":"<taskId>" }
```

## 响应示例
```json
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": "1f9febe63ecd485281213a05a9cad21c",
    "taskType": "mashup",
    "status": "succeeded",
    "errorMsg": "",
    "param": {
      "task": "mashup",
      "model": "chirp-v55",
      "mashupClipIds": ["e375e06c-d947-449b-9400-a4cba2bd8160", "064bdc20-9c1e-4bfe-ac4c-9d95b85c0817"]
    },
    "result": [
      {
        "id": "2605504f-ce42-4ca2-b64b-3c05269d5b0e",
        "title": "Patchwork Parade",
        "handle": "maressabocklit7c",
        "status": "complete",
        "user_id": "3bfb8505-eae1-4dce-8813-2d5b165543fd",
        "metadata": {
          "tags": "Pop-rap mashup with glitchy drum chops, swung trap hats … （自动生成的风格描述已省略）, mashup",
          "task": "mashup_condition",
          "type": "gen",
          "prompt": "[Verse 1] Woke up in silk and denim With a map in my hand … （完整歌词已省略）",
          "avg_bpm": 122.58,
          "max_bpm": 150,
          "min_bpm": 65.22,
          "duration": 230.68,
          "is_remix": true,
          "has_vocal": false,
          "mashup_clip_ids": ["e375e06c-d947-449b-9400-a4cba2bd8160", "064bdc20-9c1e-4bfe-ac4c-9d95b85c0817"],
          "make_instrumental": false,
          "uses_latest_model": true,
          "can_publish_with_vocal": true,
          "gpt_description_prompt": "A creative mashup song"
        },
        "audio_url": "https://cdn1.suno.ai/2605504f-ce42-4ca2-b64b-3c05269d5b0e.mp3",
        "image_url": "https://cdn2.suno.ai/image_2605504f-ce42-4ca2-b64b-3c05269d5b0e.jpeg",
        "image_large_url": "https://cdn2.suno.ai/image_large_2605504f-ce42-4ca2-b64b-3c05269d5b0e.jpeg",
        "video_url": "",
        "clip_roots": {
          "clips": [
            { "user_handle": "rositabadgercldrq", "user_display_name": "rositabadgercldrq" },
            { "user_handle": "dorialeuapts", "user_display_name": "dorialeuapts" }
          ],
          "clip_attribution_type": "remix"
        },
        "media_urls": [
          { "url": "https://d2lwuy8qc234o3.cloudfront.net/1/clip/2605504f-ce42-4ca2-b64b-3c05269d5b0e.m4a", "delivery": "progressive", "content_type": "m4a-opus" },
          { "url": "https://cdn1.suno.ai/2605504f-ce42-4ca2-b64b-3c05269d5b0e.mp3", "delivery": "progressive", "content_type": "mp3" }
        ],
        "model_name": "chirp-fenix",
        "batch_index": 0,
        "display_tags": "pop-rap, trap, mashup",
        "created_at": "2026-07-08T07:56:11.338Z",
        "major_model_version": "v5.5"
      },
      {
        "id": "6a783499-c766-4eab-bc21-6dfb5a55c7d3",
        "title": "Patchwork Parade",
        "status": "complete",
        "metadata": {
          "task": "mashup_condition",
          "duration": 231.6,
          "is_remix": true,
          "has_vocal": false,
          "mashup_clip_ids": ["e375e06c-d947-449b-9400-a4cba2bd8160", "064bdc20-9c1e-4bfe-ac4c-9d95b85c0817"],
          "gpt_description_prompt": "A creative mashup song"
        },
        "audio_url": "https://cdn1.suno.ai/6a783499-c766-4eab-bc21-6dfb5a55c7d3.mp3",
        "image_url": "https://cdn2.suno.ai/image_6a783499-c766-4eab-bc21-6dfb5a55c7d3.jpeg",
        "batch_index": 1,
        "display_tags": "pop-rap, trap, mashup",
        "major_model_version": "v5.5"
      }
    ],
    "createTime": "2026-07-08 15:56:09",
    "completeTime": "2026-07-08 15:59:46"
  }
}
```

## 响应字段说明
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| code | number | 状态码，200 表示成功 |
| msg | string | 提示信息 |
| data.id | string | 任务 ID（= 提交时拿到的 taskId，用于轮询查询） |
| data.taskType | string | 任务类型，与提交的 task 一致 |
| data.status | string | 任务状态：pending 处理中 / succeeded 成功 / failed 失败 |
| data.errorMsg | string | 失败原因，成功时为空 |
| data.param | object | 原样回显你提交的请求参数 |
| data.result | array | 生成结果，一次返回 2 条候选片段 |
| data.result[].id | string | 生成片段的 clipId，可继续用于再次 extend / cover 等 |
| data.result[].audio_url | string | 音频文件地址（mp3） |
| data.result[].video_url | string | 视频文件地址（mp4），有时为空需稍后再查 |
| data.result[].image_url | string | 封面图地址（image_large_url 为大图） |
| data.result[].title | string | 歌曲标题 |
| data.result[].status | string | 片段状态，complete 表示可下载 |
| data.result[].metadata.duration | number | 音频总时长（秒） |
| data.result[].metadata.tags | string | 风格标签 |
| data.result[].metadata.task | string | mashup 的片段 metadata.task 显示为 mashup_condition |
| data.result[].metadata.mashup_clip_ids | array | 参与混搭的源片段 ID（= 你传的 mashupClipIds） |
| data.result[].metadata.gpt_description_prompt | string | 混搭的风格描述（AI 生成） |
| data.result[].metadata.avg_bpm | number | 平均速度 BPM（另有 max_bpm/min_bpm） |
| data.result[].metadata.has_vocal | bool | 是否含人声 |
| data.result[].display_tags | string | 检测到的风格标签，如 "pop-rap, trap, mashup" |
| data.result[].metadata.is_remix | bool | 是否二次创作，mashup 恒为 true |
| data.result[].clip_roots | object | 源片段（父曲）信息：标题 / 封面 / 作者 |
| data.result[].media_urls | array | 多格式音频地址（m4a-opus / mp3） |
| data.result[].batch_index | number | 候选序号（0、1） |
| data.result[].major_model_version | string | 生成所用模型版本，如 v4.5 / v5.5 |
| data.createTime / completeTime | string | 任务提交时间 / 完成时间 |
| 其它字段 | — | action_config / model_badges / secondary_badges / ownership / avatar_image_url 等为 Suno 前端展示用，可忽略 |

## OpenAI 协议写法
同一个 task 也可用 `POST /v1/audio/generations` 调用（body 加 `task: "mashup"`，model 写成 suno-v6 形式），用 `GET /v1/audio/generations/{id}` 轮询，非音频类结果在 `result` 字段。

```bash
curl -X POST https://api.novapi.ai/v1/audio/generations \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "suno-v6",
  "task": "mashup",
  "mashupClipIds": [
    "e375e06c-d947-449b-9400-a4cba2bd8160",
    "064bdc20-9c1e-4bfe-ac4c-9d95b85c0817"
  ]
}'
# -> { "id":"audio_<taskId>", "object":"audio.generation", "status":"queued", ... }
# poll: GET https://api.novapi.ai/v1/audio/generations/audio_<taskId>
```
