> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ttapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Suno Section Replacement API Documentation

> Use the Suno section replacement API to rewrite or regenerate specific parts of a song without rebuilding the entire track from scratch.

<Note>
  **Tip**: The replacement lyrics should have some overlap with the original lyrics, and ideally the timing should align.

  **infill\_lyrics**: The new lyric segment you want to fill in or replace.

  **prompt**: The context—concatenate the original lyrics before and after the new lyrics.

  **Example**: Original lyrics are \[Verse 1]AA \[Chorus]BB \[Verse 2]CC \[Chorus]DD \[Outro]EE. If you want to replace CC with OO:

  * Set **infill\_lyrics** to OO (the new lyrics to insert).

  * Set **prompt** to BB \[Verse 2]OO\[Chorus]DD (include part of the original lyrics before and after OO to form the context).

  This allows the model to generate the best result based on the surrounding context in **prompt** and the new lyrics in **infill\_lyrics**.
</Note>


## OpenAPI

````yaml openapi/en/suno.json POST /suno/v1/replace-section
openapi: 3.1.0
info:
  title: TTAPI API DOCS
  version: 1.0.0
  description: Suno AI Music API
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /suno/v1/replace-section:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    music_id:
                      type: string
                      description: Audio ID
                    infill_start_s:
                      type: number
                      description: Replacement start time, in seconds.
                    infill_end_s:
                      type: number
                      description: Replacement end time, in seconds.
                    prompt:
                      type: string
                      description: Context lyrics.
                    infill_lyrics:
                      type: string
                      description: New lyrics.
                  required:
                    - music_id
                    - mv
                    - infill_start_s
                    - infill_end_s
                - $ref: '#/components/schemas/Mv_Params'
                - $ref: '#/components/schemas/Title_Params'
                - $ref: '#/components/schemas/Tags_Params'
                - $ref: '#/components/schemas/Negative_tags_Params'
                - $ref: '#/components/schemas/IsStorageParams'
                - $ref: '#/components/schemas/HookUrlParams'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    Mv_Params:
      type: object
      properties:
        mv:
          type: string
          default: chirp-v5
          enum:
            - chirp-v5-5
            - chirp-v5
            - chirp-v4-5+
            - chirp-v4-5
            - chirp-v4-5-all
            - chirp-v4
            - chirp-v3-5
            - chirp-v3-0
          description: Model to use.
    Title_Params:
      type: object
      properties:
        title:
          type: string
          description: |-
            Music title.

            Used in custom mode (custom=true). Maximum length: 80 characters.
    Tags_Params:
      type: object
      properties:
        tags:
          type: string
          description: |-
            Music style or genre.

            Used in custom mode (custom=true). Maximum length: 1000 characters.
          example: rock, blues, hip-hop, r&b
    Negative_tags_Params:
      type: object
      properties:
        negative_tags:
          type: string
          description: |-
            Music styles or genres that should be excluded from generation.

            Used in custom mode (custom=true).
    IsStorageParams:
      type: object
      properties:
        isStorage:
          type: boolean
          default: true
          description: >-
            Whether to store the generated audio.


            - **true**: The audio will be stored and a TTAPI CDN URL will be
            returned

            - **false**: The original source URL will be returned
    HookUrlParams:
      type: object
      properties:
        hookUrl:
          type: string
          description: Callback notification URL
  responses:
    SuccessResponse:
      description: Request successful
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: SUCCESS
              message:
                type: string
                example: success
              data:
                type: object
                example:
                  jobId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            required:
              - status
              - message
              - data
    400Response:
      description: Parameter error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: Authorization failed
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        You can obtain your API key from the <a
        href='https://dashboard.ttapi.io' target='_blank'>TTAPI Dashboard</a>.

````