> ## 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 替换段落

> 重新生成某一时间段（同 generate replace_section）

替换已有歌曲的某一区间。语义同 `/suno/v2/generate` 的 `task=replace_section`，并通过 `clip_id` **强制同账号**选号。

<Warning>
  **计费**同替换策略（非剪辑免费项）。**不要**写进 `/studio/edit` 的 `ops`。可与 edit / addSection 串联：先 replace 再 crop 收尾。
</Warning>

通过 [查询任务状态](/zh/api-reference/suno/task) 轮询至 `success`。字段对齐 generate 时，也可查阅 [Generate Schema](/zh/api-reference/suno/generateSchema) 的 `replace_section`。

## 参数

| 字段                         | 类型     | 必填 | 说明                              |
| -------------------------- | ------ | -- | ------------------------------- |
| `clip_id`                  | string | 是  | 源 clip                          |
| `model`                    | string | 是  | 模型版本（如 `chirp-v55`）             |
| `range`                    | object | 是  | 要替换的区间（`start_s`, `end_s`）      |
| `infill_context_range`     | object | 是  | 包含替换区的上下文区间                     |
| `continued_aligned_prompt` | string | 否  | 替换后的完整歌词                        |
| `prompt`                   | string | 否  | 替换区歌词                           |
| `tags`                     | string | 否  | 风格                              |
| `negative_tags`            | string | 否  | 排除风格                            |
| `infill_type`              | string | 否  | `smart` \| `classic` \| `fixed` |
| `persona`                  | object | 否  | Persona 绑定                      |
| `title`                    | string | 否  | 标题                              |

## 示例

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

````