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

# Studio Replace Section

> Regenerate a time range (same as generate replace_section)

Replace a range of an existing song. Same semantics as `/suno/v2/generate` with `task=replace_section`, with **same-account** routing via `clip_id`.

<Warning>
  **Billed** like replace (not a free trim). Do **not** put this into `/studio/edit` `ops`. You may chain after edit / addSection using the new clip.
</Warning>

Poll [Get Task Status](/api-reference/suno/task) until `success`. For field details that mirror generate, also see [Generate Schema](/api-reference/suno/generateSchema) for `replace_section`.

## Parameters

| Field                      | Type   | Required | Description                           |
| -------------------------- | ------ | -------- | ------------------------------------- |
| `clip_id`                  | string | Yes      | Source clip                           |
| `model`                    | string | Yes      | Model version (e.g. `chirp-v55`)      |
| `range`                    | object | Yes      | Range to replace (`start_s`, `end_s`) |
| `infill_context_range`     | object | Yes      | Context window containing `range`     |
| `continued_aligned_prompt` | string | No       | Full lyrics after replace             |
| `prompt`                   | string | No       | Lyrics for the replaced section       |
| `tags`                     | string | No       | Style tags                            |
| `negative_tags`            | string | No       | Styles to exclude                     |
| `infill_type`              | string | No       | `smart` \| `classic` \| `fixed`       |
| `persona`                  | object | No       | Persona binding                       |
| `title`                    | string | No       | Title                                 |

## Example

```bash theme={null}
curl -X POST https://api.mountsea.ai/suno/v2/studio/replace \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "clip_id": "5a3c023f-d1ed-4a85-b61e-168dde2b6659",
    "model": "chirp-v55",
    "range": { "start_s": 20, "end_s": 32 },
    "infill_context_range": { "start_s": 10, "end_s": 42 },
    "prompt": "[Verse]\nNew lyrics for this section",
    "tags": "Pop, Soft"
  }'
```


## OpenAPI

````yaml POST /suno/v2/studio/replace
openapi: 3.0.0
info:
  title: Suno AI
  description: API documentation for Suno AI
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.mountsea.ai
    description: API Gateway
security: []
tags:
  - name: suno
    description: ''
  - name: suno/studio
    description: Studio Song Editor（与 audio/crop|fade|reverse 独立）
paths:
  /suno/v2/studio/replace:
    post:
      tags:
        - suno/studio
      summary: Studio replace section
      description: >-
        语义同 /generate task=replace_section（计费同替换），强制同账号选号。不写入 /studio/edit 的
        ops；可与 edit / addSection 串联使用。
      operationId: ApiStudioController_replace
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StudioReplaceDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIdDto'
      security:
        - bearerAuth: []
components:
  schemas:
    StudioReplaceDto:
      type: object
      properties:
        clip_id:
          type: string
          description: 原歌曲 clip_id（继续/被替换的源曲）
        model:
          type: string
          description: 模型版本
          example: chirp-v55
        range:
          description: 要替换的区间
          allOf:
            - $ref: '#/components/schemas/RangeDto'
        infill_context_range:
          description: 包含替换区的上下文区间
          allOf:
            - $ref: '#/components/schemas/RangeDto'
        continued_aligned_prompt:
          type: string
          description: 歌曲完整歌词（替换后）
        prompt:
          type: string
          description: 替换区歌词
        tags:
          type: string
          description: 风格 tags
        negative_tags:
          type: string
          description: 排除风格
        title:
          type: string
          description: 标题
        infill_type:
          type: string
          enum:
            - smart
            - classic
            - fixed
          description: infill 模式
        persona:
          $ref: '#/components/schemas/PersonaDto'
      required:
        - clip_id
        - model
        - range
        - infill_context_range
    TaskIdDto:
      type: object
      properties:
        taskId:
          type: string
          description: task id. Use this id to query task status.
          example: 15c257ff-43f7-4678-bd41-202ad6b8488b
      required:
        - taskId
    RangeDto:
      type: object
      properties:
        start_s:
          type: number
          minimum: 0
          description: Start time in seconds.
          example: 10
        end_s:
          type: number
          minimum: 0
          description: End time in seconds. Must be >= start_s.
          example: 25
      required:
        - start_s
        - end_s
    PersonaDto:
      type: object
      properties:
        artist_clip_id:
          type: string
          description: Artist clip ID for style reference.
          example: clip_abc123
        persona_id:
          type: string
          description: Persona/timbre ID.
          example: persona_xyz789
        persona_style:
          type: string
          description: Persona style. Only "vox" supported for chirp-v50+.
          example: vox
          default: null
          enum:
            - vox
        is_voice:
          type: boolean
          default: false
          description: >-
            Whether this is a voice persona (created via
            /voicePersona/init+complete with voice recording). Voice personas
            are bound to a specific account by voiceprint and MUST be used on
            the same account that created them. Regular personas (created via
            /persona) are not account-bound and can be used by any account.
            Default: false (regular persona).
          example: false
      required:
        - artist_clip_id
        - persona_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````