> ## 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.

# Replace section

> task=replace_section — rewrite a span with explicit context

Rewrite a time span of a clip. You supply the rewritten lyrics **and** the context window. If you only know the span, use [Simple replace](/api-reference/suno/generateReplaceSimple) — the server fills the rest and stores the task as `replace_section`.

Use a span of at least **4 seconds**. Shorter selections usually fail and the credits are refunded. This task does not widen the span for you — [Simple replace](/api-reference/suno/generateReplaceSimple) does.

`infill_context_range` should reach about **30 seconds before** `range.start_s` and **30 seconds after** `range.end_s`.

`POST /suno/v2/generate` returns `{ "taskId" }`. Poll [Get Task Status](/api-reference/suno/task). Schema: `GET /suno/v2/generate/schema?task=replace_section`.

## Parameters

| Field | Required | Notes |
| - | - | - |
| `task` | Yes | `"replace_section"` |
| `model` | Yes | `chirp-v6` recommended |
| `clip_id` | Yes | Clip to edit |
| `range` | Yes | `{ "start_s", "end_s" }`. Prefer ≥ 4s. Shorter spans usually fail and are refunded |
| `infill_context_range` | Yes | About 30s before `range.start_s` and 30s after `range.end_s` |
| `continued_aligned_prompt` | Yes | Full lyrics with the replacement already written in |
| `prompt` | No | Lyrics that fall inside `infill_context_range` |
| `infill_lyrics` | No | The replacement lines alone |
| `infill_type` | No | Deprecated. `smart` / `classic` / `fixed` all infill |
| `persona` | No | Allowed |

Other optional fields: [shared list](/api-reference/suno/generate-tasks#shared-optional-fields).

## Example

```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.