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

# 替换片段

> 只重写指定时间区间。

**路径：** `POST https://api.omniall.ai/suno/v2/replace-section`

计费模型：`suno/replace-section`。返回公开 `task_xxxx`，用 fetch 接口轮询。

鉴权：`Authorization: Bearer sk-...`



## OpenAPI

````yaml zh-CN/openapi/suno-v2.yaml POST /suno/v2/replace-section
openapi: 3.1.0
info:
  title: Omniall AI — Suno V2
  version: 1.0.0
  description: >-
    Suno V2 异步音乐 API（`/suno/v2/*`）。


    流程：提交 → 返回 `data.task_id` → `GET /suno/v2/fetch/{task_id}` 或 `POST
    /suno/v2/fetch` 轮询至 `SUCCESS`。


    **模型版本 `mv`：** `chirp-v6`（默认）· `chirp-v6-wild` · `chirp-v6-mini`。


    **计费：** 按次，模型名与路径一致（如 `suno/music`）。开启 `max_mode`（且
    `custom=true`）时部分生成类接口价格翻倍。详见[模型广场](https://omniall.ai/pricing)。


    与旧版 `/suno/submit/*`（`suno_music` / `suno_lyrics`）相互独立。


    鉴权：`Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /suno/v2/replace-section:
    post:
      tags:
        - Suno V2
      summary: 替换片段
      description: |-
        只重写指定时间区间。

        **路径：** `POST https://api.omniall.ai/suno/v2/replace-section`

        计费模型：`suno/replace-section`。返回公开 `task_xxxx`，用 fetch 接口轮询。

        鉴权：`Authorization: Bearer sk-...`
      operationId: sunoV2ReplaceSection
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API Key，例如 `Bearer sk-...`。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mv:
                  type: string
                  enum:
                    - chirp-v6
                    - chirp-v6-wild
                    - chirp-v6-mini
                  default: chirp-v6
                  description: 模型版本。三个版本价格相同，按需要的风格选择。
                  example: chirp-v6
                music_id:
                  type: string
                  description: 源曲目。要处理的曲目，填之前生成结果里的 music_id。
                infill_start_s:
                  type: number
                  description: 重写起点。要重写的片段从第几秒开始。
                infill_end_s:
                  type: number
                  description: 重写终点。要重写的片段到第几秒结束。
                prompt:
                  type: string
                  description: 完整歌词，最长 5000 字。可以用 [Verse]、[Chorus] 这类标记划分段落。
                infill_lyrics:
                  type: string
                  description: 新歌词。重写这段要演唱的歌词。
                title:
                  type: string
                  description: 曲目标题，最长 80 字。
                tags:
                  type: string
                  description: 风格标签。想要的曲风，例如「lo-fi 钢琴, 舒缓, 雨声」，最长 1000 字。
                negative_tags:
                  type: string
                  description: 排除风格。不希望出现的曲风，用来避开某些方向。
                variety:
                  type: string
                  enum:
                    - 'off'
                    - normal
                    - high
                    - extra
                    - max
                  description: 风格发散度。控制成品与指定风格的偏离程度，从完全贴合到大胆发挥。
                  example: 'off'
                max_mode:
                  type: boolean
                  default: false
                  description: 最高质量模式。投入更多算力让整首歌前后更连贯。仅自定义模式有效，开启后价格翻倍。
                model_id:
                  type: string
                  description: 用自建模型来生成，填创建模型结果里的 model_id。不能与 persona_id 同时使用。
                audio_format:
                  type: string
                  enum:
                    - mp3
                    - m4a
                    - wav
                  description: 输出格式。成品音频的格式，不填默认 mp3。
                  example: mp3
              required:
                - infill_end_s
                - infill_start_s
                - music_id
            example:
              mv: chirp-v6
              music_id: music_xxx
              infill_start_s: 12
              infill_end_s: 28
              infill_lyrics: 重写这段副歌
      responses:
        '200':
          description: 任务已受理
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SunoV2SubmitResponse'
              example:
                code: success
                message: success
                data:
                  task_id: task_xxxxxxxx
components:
  schemas:
    SunoV2SubmitResponse:
      type: object
      properties:
        code:
          type: string
          example: success
        message:
          type: string
          example: success
        data:
          type: object
          properties:
            task_id:
              type: string
              description: 公开任务 ID（`task_xxxx`）。
              example: task_xxxxxxxx

````

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