> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omniall.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Suno V2 音乐 API

> Suno V2（/suno/v2/*）异步音乐：生成、翻唱、续写、分轨、歌词、音色与风格模型。

# Suno V2 音乐 API

通过 Omniall 异步接口调用 **Suno V2**。网关返回公开任务 id（`task_xxxx`），用 fetch 轮询结果。

与旧版 `/suno/submit/music`（模型 `suno_music`）**相互独立**，请勿混用路径与模型名。

**API 主机：** `https://api.omniall.ai`\
**鉴权：** `Authorization: Bearer sk-...`\
**计费模型：** 与路径一致，如 `suno/music`、`suno/lyrics` — 见[模型广场](https://omniall.ai/pricing)。

## 接口一览

完整字段见 **API Reference → 音频 → Suno V2**。常用：

| 能力 | 方法 | 路径 | 模型 |
| - | - | - | - |
| 生成音乐 | `POST` | `/suno/v2/music` | `suno/music` |
| 翻唱 | `POST` | `/suno/v2/cover` | `suno/cover` |
| 上传翻唱 | `POST` | `/suno/v2/upload-cover` | `suno/upload-cover` |
| 上传续写 | `POST` | `/suno/v2/upload-extend` | `suno/upload-extend` |
| 续写 | `POST` | `/suno/v2/extend` | `suno/extend` |
| 加人声 / 伴奏 / 分轨 | `POST` | `/suno/v2/add-vocals` 等 | 同路径 |
| 替换片段 | `POST` | `/suno/v2/replace-section` | `suno/replace-section` |
| 混搭 | `POST` | `/suno/v2/mashup` | `suno/mashup` |
| 参考生成 | `POST` | `/suno/v2/inspo` | `suno/inspo` |
| 采样再创作 | `POST` | `/suno/v2/sample` | `suno/sample` |
| 音效 | `POST` | `/suno/v2/sounds` | `suno/sounds` |
| 重制 | `POST` | `/suno/v2/remaster` | `suno/remaster` |
| 分轨 / 全部分轨 | `POST` | `/suno/v2/stems` · `/stems-all` | 对应模型 |
| 歌词 | `POST` | `/suno/v2/lyrics` | `suno/lyrics` |
| 提取音色 | `POST` | `/suno/v2/persona` | `suno/persona` |
| 克隆音色 | `POST` | `/suno/v2/create-voice` | `suno/create-voice` |
| 训练风格模型 | `POST` | `/suno/v2/create-model` | `suno/create-model` |
| 查询 | `GET` / `POST` | `/suno/v2/fetch/{id}` · `/suno/v2/fetch` | — |

## 模型版本

请求体 `mv`（多数生成类接口，未传默认 `chirp-v6`）：

* `chirp-v6`：均衡（默认）
* `chirp-v6-wild`：风格更奔放
* `chirp-v6-mini`：更快

`remaster` / `stems` / `stems-all` / `lyrics` / `persona` / `create-voice` / `create-model` 不需要 `mv`。

## 快速开始：生成音乐

描述模式（`custom=false`，默认）：

```bash theme={null}
export HOST=https://api.omniall.ai
export API_KEY=sk-...

curl -X POST "$HOST/suno/v2/music" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mv": "chirp-v6",
    "custom": false,
    "gpt_description_prompt": "轻柔的 lo-fi 钢琴，雨夜散步",
    "instrumental": false
  }'
```

自定义歌词（`custom=true`）：

```bash theme={null}
curl -X POST "$HOST/suno/v2/music" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mv": "chirp-v6",
    "custom": true,
    "prompt": "[Verse]\n霓虹倒映在潮湿路面\n[Chorus]\n我们穿过整座不夜城",
    "tags": "indie pop, neon",
    "title": "霓虹雨",
    "max_mode": false
  }'
```

成功响应示例：

```json theme={null}
{
  "code": "success",
  "message": "success",
  "data": { "task_id": "task_xxxxxxxx" }
}
```

## 轮询结果

```bash theme={null}
curl "$HOST/suno/v2/fetch/task_xxxxxxxx" \
  -H "Authorization: Bearer $API_KEY"
```

批量：

```bash theme={null}
curl -X POST "$HOST/suno/v2/fetch" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids":["task_xxxxxxxx","task_yyyyyyyy"]}'
```

`status` 为 `SUCCESS` 时读取 `musics`（含 `audio_url` 等）；歌词任务读 `lyrics`；音色 / 风格模型读 `persona_id` / `model_id`。

## max\_mode 计费

部分生成类接口支持 `max_mode`。仅在 **`custom=true` 且 `max_mode=true`** 时按次价翻倍；描述模式下开启无效。是否支持以模型详情页为准。

## 常见必填

| 接口 | 关键必填 |
| - | - |
| music（描述模式） | `gpt_description_prompt` |
| music（自定义） | `prompt` |
| cover / add-\* / remaster / stems\* / persona | `music_id` |
| upload-cover / upload-extend / create-voice | 公网 `audio_url` |
| upload-extend / extend | `continue_at` |
| replace-section | `infill_start_s`、`infill_end_s` |
| mashup | `mashup_music_id`（恰好 2 个） |
| inspo | `audio_urls`（1–4） |
| sounds | `sound` |
| lyrics | `prompt` |
| persona | `name`（可选人声区间，须成对且 \<30s） |
| create-model | `name`、`audio_urls`（6–24） |

`persona_id` 与 `model_id` 不可同时传。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.