# 音质重制

**这是什么**：把一首歌的音质重新优化、提升清晰度。

**什么时候用**：觉得歌曲音质不够好、想升级时用。

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

## 请求参数
| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| task | string | 是 | 固定填 remaster |
| clipId | string | 是 | 要重制的片段 ID |
| modelName | string | 是 | chirp-carp（V5，推荐）/ chirp-bass（V4.5+） |

## 请求示例
```bash
curl -X POST https://api.novapi.ai/api/cqt/generator/suno \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{ "task":"remaster", "clipId":"9fa578f8-deb9-41fd-8eb2-31f31d1ab516", "modelName":"chirp-carp" }'
# -> { "code":200, "data":"<taskId>" }
```

## 响应示例
```json
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": "a8093d9b5c064bef8885560aa9f034c5",
    "taskType": "remaster",
    "status": "succeeded",
    "errorMsg": "",
    "param": {
      "task": "remaster",
      "clipId": "9fa578f8-deb9-41fd-8eb2-31f31d1ab516",
      "modelName": "chirp-carp"
    },
    "result": {
      "clips": [
        {
          "id": "bc066df7-d3cd-4632-bf1c-ffa5d0be0c2a",
          "title": "星尘回音 (Remastered)",
          "handle": "mosellesantiagoxfslm",
          "status": "complete",
          "user_id": "9ad4dbdb-9010-4f07-98f1-537b876e3fb9",
          "metadata": {
            "tags": "ambient pop",
            "task": "upsample",
            "type": "upsample",
            "prompt": "[Verse 1] 我关了所有的光 让黑暗漫进窗 …（完整歌词已省略）",
            "duration": 202.92,
            "is_remix": true,
            "edited_clip_id": "9fa578f8-deb9-41fd-8eb2-31f31d1ab516",
            "upsample_clip_id": "9fa578f8-deb9-41fd-8eb2-31f31d1ab516",
            "uses_latest_model": false,
            "can_publish_with_vocal": true
          },
          "audio_url": "https://cdn1.suno.ai/bc066df7-d3cd-4632-bf1c-ffa5d0be0c2a.mp3",
          "image_url": "https://cdn2.suno.ai/image_bc066df7-d3cd-4632-bf1c-ffa5d0be0c2a.jpeg",
          "image_large_url": "https://cdn2.suno.ai/image_large_bc066df7-d3cd-4632-bf1c-ffa5d0be0c2a.jpeg",
          "video_url": "",
          "clip_roots": {
            "clips": [
              {
                "id": "9fa578f8-deb9-41fd-8eb2-31f31d1ab516",
                "title": "星尘回音",
                "image_url": "https://cdn2.suno.ai/image_9fa578f8-deb9-41fd-8eb2-31f31d1ab516.jpeg",
                "user_handle": "mosellesantiagoxfslm",
                "user_display_name": "mosellesantiagoxfslm"
              }
            ],
            "clip_attribution_type": "remix"
          },
          "media_urls": [
            { "url": "https://d2lwuy8qc234o3.cloudfront.net/1/clip/bc066df7-d3cd-4632-bf1c-ffa5d0be0c2a.m4a", "delivery": "progressive", "content_type": "m4a-opus" },
            { "url": "https://cdn1.suno.ai/bc066df7-d3cd-4632-bf1c-ffa5d0be0c2a.mp3", "delivery": "progressive", "content_type": "mp3" }
          ],
          "model_name": "chirp-carp",
          "batch_index": 0,
          "created_at": "2026-07-08T08:18:59.224Z",
          "major_model_version": "v5"
        },
        {
          "id": "2ddcb07c-3c39-4b6a-ade4-6fc29ce37eae",
          "title": "星尘回音 (Remastered)",
          "status": "complete",
          "metadata": {
            "task": "upsample",
            "type": "upsample",
            "duration": 202.92,
            "is_remix": true,
            "upsample_clip_id": "9fa578f8-deb9-41fd-8eb2-31f31d1ab516"
          },
          "audio_url": "https://cdn1.suno.ai/2ddcb07c-3c39-4b6a-ade4-6fc29ce37eae.mp3",
          "image_url": "https://cdn2.suno.ai/image_2ddcb07c-3c39-4b6a-ade4-6fc29ce37eae.jpeg",
          "model_name": "chirp-carp",
          "batch_index": 1,
          "major_model_version": "v5"
        }
      ]
    },
    "createTime": "2026-07-08 16:18:56",
    "completeTime": "2026-07-08 16:19:31"
  }
}
```

## 响应字段说明
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| code | number | 状态码，200 表示成功 |
| msg | string | 提示信息 |
| data.id | string | 任务 ID（= 提交时拿到的 taskId） |
| data.taskType | string | 任务类型，恒为 remaster |
| data.status | string | 任务状态：pending 处理中 / succeeded 成功 / failed 失败 |
| data.param | object | 原样回显你提交的请求参数 |
| data.result | object | ⚠ 这里是对象（不是数组），2 条候选在 result.clips 里 |
| data.result.clips | array | 重制后的成品片段（2 条候选） |
| data.result.clips[].id | string | 成品片段的 clipId |
| data.result.clips[].title | string | 标题，带 "(Remastered)" 后缀 |
| data.result.clips[].audio_url | string | 重制后音频地址（mp3） |
| data.result.clips[].image_url | string | 封面图地址（image_large_url 为大图） |
| data.result.clips[].status | string | 片段状态，complete 表示可下载 |
| data.result.clips[].metadata.task / type | string | 底层任务，均为 upsample（音质重制走 upsample） |
| data.result.clips[].metadata.upsample_clip_id | string | 被重制的源片段 ID（= 你传的 clipId；edited_clip_id 同值） |
| data.result.clips[].metadata.duration | number | 音频总时长（秒） |
| data.result.clips[].model_name | string | 重制所用模型（= 你传的 modelName，如 chirp-carp） |
| data.result.clips[].clip_roots | object | 源曲信息：标题 / 封面 / 作者 |
| data.result.clips[].media_urls | array | 多格式音频地址（m4a-opus / mp3） |
| data.createTime / completeTime | string | 任务提交时间 / 完成时间 |
| 其它字段 | — | action_config / model_badges / secondary_badges / ownership / avatar_image_url 等为 Suno 前端展示用，可忽略 |

## OpenAI 协议写法
同一个 task 也可用 `POST /v1/audio/generations` 调用（body 加 `task: "remaster"`，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",
  "task": "remaster",
  "clipId": "9fa578f8-deb9-41fd-8eb2-31f31d1ab516",
  "modelName": "chirp-carp"
}'
# -> { "id":"audio_<taskId>", "object":"audio.generation", "status":"queued", ... }
# poll: GET https://api.novapi.ai/v1/audio/generations/audio_<taskId>
```
