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

# 替换片段

> task=replace_section — 自己给出上下文，重写一段

重写片段里的一段时间。你要自己给出改好的歌词**和**上下文窗口。如果只知道时间段，用 [简单替换](/zh/api-reference/suno/generateReplaceSimple) — 服务端补齐其余字段，任务按 `replace_section` 存储。

选区建议至少 **4 秒**。更短的选区通常会失败并退回积分。这个任务不会帮你加宽选区，[简单替换](/zh/api-reference/suno/generateReplaceSimple) 才会。

`infill_context_range` 应大约覆盖 `range.start_s` **之前 30 秒**和 `range.end_s` **之后 30 秒**。

`POST /suno/v2/generate` 返回 `{ "taskId" }`。轮询 [查询任务状态](/zh/api-reference/suno/task)。Schema：`GET /suno/v2/generate/schema?task=replace_section`。

## 参数

| 字段 | 必填 | 说明 |
| - | - | - |
| `task` | 是 | `"replace_section"` |
| `model` | 是 | 建议 `chirp-v6` |
| `clip_id` | 是 | 要改的片段 |
| `range` | 是 | `{ "start_s", "end_s" }`。建议 ≥ 4 秒。更短通常失败并退积分 |
| `infill_context_range` | 是 | 大约在 `range.start_s` 前 30 秒、`range.end_s` 后 30 秒 |
| `continued_aligned_prompt` | 是 | 已经写好替换内容的完整歌词 |
| `prompt` | 否 | 落在 `infill_context_range` 里的歌词 |
| `infill_lyrics` | 否 | 只放替换的那几句 |
| `infill_type` | 否 | 已废弃。`smart` / `classic` / `fixed` 都是 infill |
| `persona` | 否 | 可以使用 |

其他可选字段：[共用列表](/zh/api-reference/suno/generate-tasks#shared-optional-fields)。

## 示例

```json theme={null}
{
  "task": "replace_section",
  "model": "chirp-v6",
  "title": "Summer Vibes (Fixed)",
  "tags": "Pop, Happy",
  "clip_id": "056436f6-86b6-4cbb-a7f7-dc7bc202ea66",
  "range": { "start_s": 15.36, "end_s": 53.8 },
  "infill_context_range": { "start_s": 0, "end_s": 69.16 },
  "continued_aligned_prompt": "[Verse]\nSunshine on my face today\n[Chorus]\nSummer vibes, feeling free",
  "infill_lyrics": "Summer vibes, feeling free"
}
```


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