> ## 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 批量编辑

> 一次导出内顺序执行多项时间线操作

按顺序执行 crop / remove / duplicate / split / reverse / fade / speed，最后一次导出。通过 [查询任务状态](/zh/api-reference/suno/task) 轮询至 `success`。

<Info>
  **通常免费**（0 积分，以 `conf_task_policy` 为准）。**不要**把 `addSection` / `replace` 写进 `ops` — 请走独立接口。
</Info>

属于 [Studio 编辑](/zh/api-reference/suno/studio)。每个 op 的秒数相对「已执行完前面 ops 之后」的时间线。

## 参数

| 字段        | 类型     | 必填 | 说明                                                                                                     |
| --------- | ------ | -- | ------------------------------------------------------------------------------------------------------ |
| `clip_id` | string | 是  | 源 clip                                                                                                 |
| `ops`     | array  | 是  | 1～20 条操作（见下）                                                                                           |
| `title`   | string | 否  | 最终导出标题                                                                                                 |
| `beat`    | object | 否  | 可选节拍器导出（`enabled`，可选 `bpm` / `time_signature`）。不传则保持旧行为 — 见 [Studio 编辑](/zh/api-reference/suno/studio) |

### 支持的 `ops[].op`

| op              | 含义       | 关键字段                                        |
| --------------- | -------- | ------------------------------------------- |
| `crop`          | 只保留区间    | `start_s`, `end_s`                          |
| `removeSection` | 删除一段或多段  | `sections[]`，可选 `close_gap`（默认 true）        |
| `duplicate`     | 复制选区     | `start_s`, `end_s`，可选 `insert_at_s`         |
| `split`         | 在时间点切开   | `at_s`                                      |
| `reverse`       | 倒放选区或整曲  | 可选成对 `start_s` / `end_s`；都省略=整曲             |
| `fadeIn`        | 淡入       | `start_s`，可选 `end_s` 或 `duration_s`（默认约 2s） |
| `fadeOut`       | 淡出       | `start_s`，可选 `end_s`（默认到结尾）                 |
| `setSpeed`      | 相对原曲绝对倍率 | `rate`（0.5～2.0），可选成对 `start_s` / `end_s`    |

### 写 ops 建议

* 先 `crop` / `removeSection` 再 `fade*` / `setSpeed`。
* 改变总时长的 op 之后，后续秒数按新长度估算。
* `fadeOut.start_s` 不能超过**当前**剩余时长。
* 一次 `edit` 内做完再导出，避免连环锁。

## 示例

```bash theme={null}
curl -X POST https://api.mountsea.ai/suno/v2/studio/edit \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "clip_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "title": "精修后的歌",
    "ops": [
      { "op": "crop", "start_s": 10, "end_s": 100 },
      { "op": "removeSection", "sections": [{ "start_s": 40, "end_s": 48 }], "close_gap": true },
      { "op": "setSpeed", "start_s": 50, "end_s": 70, "rate": 1.1 },
      { "op": "fadeOut", "start_s": 85 }
    ]
  }'
```


## OpenAPI

````yaml POST /suno/v2/studio/edit
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/edit:
    post:
      tags:
        - suno/studio
      summary: Studio batch edit
      description: >-
        按 ops 顺序执行
        crop/removeSection/duplicate/split/reverse/fadeIn/fadeOut/setSpeed，最后一次导出。秒数相对「当前已执行完前面
        ops 后的时间线」。addSection/replace 请走独立接口。积分 0。
      operationId: ApiStudioController_edit
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StudioEditDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIdDto'
      security:
        - bearerAuth: []
components:
  schemas:
    StudioEditDto:
      type: object
      properties:
        clip_id:
          type: string
          description: 原歌曲 clip_id
        ops:
          minItems: 1
          maxItems: 20
          description: 操作列表，至少 1 项，建议 ≤ 20
          type: array
          items:
            $ref: '#/components/schemas/StudioEditOpDto'
        title:
          type: string
          description: 最终导出标题
        beat:
          description: Optional metronome export; omit for legacy behavior
          allOf:
            - $ref: '#/components/schemas/StudioBeatOptionsDto'
      required:
        - clip_id
        - ops
    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
    StudioEditOpDto:
      type: object
      properties:
        op:
          type: string
          enum:
            - crop
            - removeSection
            - duplicate
            - split
            - reverse
            - fadeIn
            - fadeOut
            - setSpeed
          description: 操作类型
        start_s:
          type: number
          description: 区间/淡入/淡出/变速起点秒
        end_s:
          type: number
          description: 区间/淡入/淡出/变速终点秒
        insert_at_s:
          type: number
          description: duplicate 粘贴点秒
        at_s:
          type: number
          description: split 切开点秒
        sections:
          description: removeSection 删除区间
          type: array
          items:
            $ref: '#/components/schemas/StudioSectionRangeDto'
        close_gap:
          type: boolean
          description: removeSection 是否收拢空白，默认 true
        rate:
          type: number
          minimum: 0.5
          maximum: 2
          description: setSpeed 速度倍率，建议 0.5~2.0
          example: 1.1
        duration_s:
          type: number
          description: fadeIn 时长秒（与 end_s 二选一，默认 2）
      required:
        - op
    StudioBeatOptionsDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: Whether to enable beat grid + audible metronome on export
          example: true
        bpm:
          type: number
          minimum: 30
          maximum: 480
          description: >-
            Target BPM (30~480). Only when enabled=true; omit to keep
            project/source bpm
          example: 132
        time_signature:
          type: string
          pattern: /^\d+\/\d+$/
          description: Time signature like "4/4". Only when enabled=true; default "4/4"
          example: 4/4
          default: 4/4
      required:
        - enabled
    StudioSectionRangeDto:
      type: object
      properties:
        start_s:
          type: number
          minimum: 0
          description: 区间起始秒
        end_s:
          type: number
          minimum: 0
          description: 区间结束秒
      required:
        - start_s
        - end_s
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````