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

# 歌词填充

> 只改一段歌词，不生成音乐

写一段新词，或重写已有歌词里的一段。接口调用官方 lyrics-infill，并在**当次响应**里返回官方结果。不会生成 clip，也不改变 [生成歌词](/zh/api-reference/suno/lyrics) 和 [生成音乐](/zh/api-reference/suno/generate)。

<Info>
  **同步。** 歌词就在这次响应里。**没有 `taskId`**，不要轮询 [查询任务状态](/zh/api-reference/suno/task)。
</Info>

## 参数

| 字段 | 必填 | 说明 |
| - | - | - |
| `prompt` | 是 | 要写什么，或这段怎么改。例如 `a hopeful chorus about coming home` |
| `context_lyrics_prefix` | 否 | 这段之前的歌词。不传则服务端发送 `""` |
| `context_lyrics_edit` | 否 | 正在改的这一段。不传则服务端发送 `""` |
| `context_lyrics_suffix` | 否 | 这段之后的歌词。不传则服务端发送 `""` |
| `title` | 否 | 歌名。不传则服务端发送 `""` |

## 示例

```bash theme={null}
curl -X POST https://api.mountsea.ai/suno/v2/lyricsInfill \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{
    "prompt": "a hopeful chorus about coming home",
    "title": "Home",
    "context_lyrics_prefix": "[Verse]\nPacked the car before the sun",
    "context_lyrics_edit": "[Chorus]\n",
    "context_lyrics_suffix": "[Verse]\nHighway lines until they blur"
  }'
```


## OpenAPI

````yaml POST /suno/v2/lyricsInfill
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/lyricsInfill:
    post:
      tags:
        - suno
      summary: lyrics infill
      description: >-
        Sync lyrics fill. Calls official POST /api/generate/lyrics-infill/ and
        returns that body. prompt is required. context_lyrics_prefix,
        context_lyrics_edit, context_lyrics_suffix and title are optional;
        omitted fields are sent as empty strings. This does not create music and
        does not change POST /lyrics or POST /generate.
      operationId: ApiPublicController_lyricsInfill
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LyricsInfillDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
      security:
        - bearerAuth: []
components:
  schemas:
    LyricsInfillDto:
      type: object
      properties:
        prompt:
          type: string
          description: Instruction for the lyrics to write or fill in.
          example: a hopeful chorus about coming home
        context_lyrics_prefix:
          type: string
          description: Lyrics before the edit. Omitted values are sent as an empty string.
        context_lyrics_edit:
          type: string
          description: >-
            Lyrics currently selected for edit. Omitted values are sent as an
            empty string.
        context_lyrics_suffix:
          type: string
          description: Lyrics after the edit. Omitted values are sent as an empty string.
        title:
          type: string
          description: Song title. Omitted values are sent as an empty string.
      required:
        - prompt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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