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

# Suno Replace Section

> Rewrite one section of a song with new lyrics or a new style; the new part is blended into what comes before and after. Each request returns **2 versions**.

Pick exactly one source: `task_id` + `audio_id` (one of your Suno songs) or `audio_url` (your own song). The section must be at least 10 seconds and at most 50% of the song. `variant` is not accepted: the section follows the source.

**Pricing** (per request):

| Option | Tokens | USD |
|---|---|---|
| Per request (2 versions) | 1.63 | $0.0326 |

Returns an `img_uuid`; poll GET /api/v1/jobs/detail (or use `custom_callback_url`) for the result. On success, `json` holds **one item per song** (normally 2):

```json
{
  "type": "audio",
  "value": "https://cdn4.goenhance.ai/source2/.../output.mp3",
  "audio_id": "e231a3f0-...",
  "title": "Rainy Night",
  "audio_duration": 187.4,
  "style": "lofi hip hop, mellow piano",
  "lyrics": "[Verse] ..."
}
```

Keep the task's `img_uuid` and each song's `audio_id`: that pair is how you extend the song, export WAV, make a music video, split stems or get timestamped lyrics later. Result links expire (see `link_expired_at`), so download the files you want to keep.



## OpenAPI

````yaml api-reference/audio-generations/openapi-suno-replace-section.json POST /api/v1/audio/generations
openapi: 3.1.0
info:
  title: GoEnhance API - Suno Replace Section
  description: Rewrite a section of a song with new lyrics or style.
  version: 1.0.0
servers:
  - url: https://api.goenhance.ai
security: []
paths:
  /api/v1/audio/generations:
    post:
      tags:
        - AudioGenerations
      summary: Suno Replace Section
      description: >-
        Rewrite one section of a song with new lyrics or a new style; the new
        part is blended into what comes before and after. Each request returns
        **2 versions**.


        Pick exactly one source: `task_id` + `audio_id` (one of your Suno songs)
        or `audio_url` (your own song). The section must be at least 10 seconds
        and at most 50% of the song. `variant` is not accepted: the section
        follows the source.


        **Pricing** (per request):


        | Option | Tokens | USD |

        |---|---|---|

        | Per request (2 versions) | 1.63 | $0.0326 |


        Returns an `img_uuid`; poll GET /api/v1/jobs/detail (or use
        `custom_callback_url`) for the result. On success, `json` holds **one
        item per song** (normally 2):


        ```json

        {
          "type": "audio",
          "value": "https://cdn4.goenhance.ai/source2/.../output.mp3",
          "audio_id": "e231a3f0-...",
          "title": "Rainy Night",
          "audio_duration": 187.4,
          "style": "lofi hip hop, mellow piano",
          "lyrics": "[Verse] ..."
        }

        ```


        Keep the task's `img_uuid` and each song's `audio_id`: that pair is how
        you extend the song, export WAV, make a music video, split stems or get
        timestamped lyrics later. Result links expire (see `link_expired_at`),
        so download the files you want to keep.
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: false
          example: '{{Authorization}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  enum:
                    - suno-replace-section
                  description: Model name. Must be `suno-replace-section`.
                task_id:
                  type: string
                  description: >-
                    The `img_uuid` of one of your earlier successful Suno tasks
                    that produced songs (`suno-v6`, `suno-extend`, `suno-cover`,
                    `suno-add-vocals`, `suno-add-instrumental`,
                    `suno-replace-section` or `suno-mashup`). Must be sent
                    together with `audio_id`.
                audio_id:
                  type: string
                  description: >-
                    The `audio_id` of the song to use, taken from that task's
                    result (`json[].audio_id`). Must be sent together with
                    `task_id`.
                audio_url:
                  type: string
                  format: uri
                  description: >-
                    Alternative to `task_id` + `audio_id`: a public URL of your
                    own song.
                infill_start_s:
                  type: number
                  minimum: 0
                  description: >-
                    Required. Start of the section to replace, in seconds (2
                    decimals).
                infill_end_s:
                  type: number
                  minimum: 0
                  description: >-
                    Required. End of the section to replace, in seconds (2
                    decimals). The section must be at least 10 seconds and no
                    longer than 50% of the song.
                lyrics:
                  type: string
                  maxLength: 5000
                  description: >-
                    Required. New lyrics for the replaced section. Use section
                    markers such as `[Verse]` and `[Chorus]`. Max 5000
                    characters.
                full_lyrics:
                  type: string
                  maxLength: 5000
                  description: >-
                    Required. The complete lyrics of the song after the
                    replacement.
                style:
                  type: string
                  maxLength: 1000
                  description: >-
                    Required. Music style, e.g. `lofi hip hop, mellow piano,
                    rainy night`. Max 1000 characters.
                title:
                  type: string
                  maxLength: 80
                  description: Required. Song title. Max 80 characters.
                negative_tags:
                  type: string
                  maxLength: 200
                  description: >-
                    Optional. Styles or traits to avoid, e.g. `heavy metal,
                    screaming`. Max 200 characters.
                vocal_gender:
                  type: string
                  enum:
                    - male
                    - female
                  description: >-
                    Optional. Preferred singer gender (`m` / `f` also accepted).
                    This raises the probability; it is not guaranteed.
                style_weight:
                  type: number
                  minimum: 0
                  maximum: 1
                  description: >-
                    Optional. How strictly to follow `style`, from 0 to 1
                    (rounded to 2 decimals).
                weirdness_constraint:
                  type: number
                  minimum: 0
                  maximum: 1
                  description: >-
                    Optional. How experimental the result may be, from 0 to 1
                    (rounded to 2 decimals).
                audio_weight:
                  type: number
                  minimum: 0
                  maximum: 1
                  description: >-
                    Optional. How much the result follows the audio features of
                    the source, from 0 to 1 (rounded to 2 decimals). Not
                    available when `instrumental` is `true`.
                variety:
                  type: integer
                  minimum: 0
                  maximum: 4
                  default: 1
                  description: >-
                    Optional. How different the versions are from each other: 0
                    off, 1 normal (default), 2 high, 3 extra, 4 max.
                custom_callback_url:
                  type: string
                  format: uri
                  description: >-
                    Optional. A publicly accessible HTTPS URL. When the task
                    status changes (processing / success / failed), GoEnhance
                    sends a POST request to this URL. The request body is
                    identical to the response of GET /api/v1/jobs/detail. If
                    your server does not respond with HTTP 200, the notification
                    is retried up to 3 times, with a 3-second timeout per
                    attempt.
                  example: https://your-server.com/goenhance/callback
              required:
                - model
                - infill_start_s
                - infill_end_s
                - lyrics
                - full_lyrics
                - style
                - title
            example:
              model: suno-replace-section
              task_id: c12b656c-747a-44fd-9c80-add79b0c52d5
              audio_id: e231a3f0-6c1d-4a8b-9f10-2b8cadc7dc11
              infill_start_s: 30
              infill_end_s: 50
              lyrics: |-
                [Chorus]
                We found our way back home
              full_lyrics: |-
                [Verse]
                On the road again
                [Chorus]
                We found our way back home
              style: indie pop
              title: Road Trip
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                  data:
                    type: object
                    properties:
                      img_uuid:
                        type: string
                      cost:
                        type: number
                        description: >-
                          Tokens deducted for this request. This is the amount
                          actually charged, so it already reflects any discount
                          active on your account and can be lower than the
                          listed price. Tokens are deducted when the task is
                          accepted, and refunded automatically if the generation
                          ends in failure.
                        example: 1.63
                    required:
                      - img_uuid
                      - cost
                required:
                  - code
                  - msg
                  - data
              examples:
                '1':
                  summary: Success
                  value:
                    code: 0
                    msg: Success
                    data:
                      img_uuid: c12b656c-747a-44fd-9c80-add79b0c52d5
                      cost: 1.63
                '2':
                  summary: Insufficient tokens
                  value:
                    code: 100
                    msg: tokens is not enough
                quota:
                  summary: API key quota exceeded
                  value:
                    code: 101
                    msg: 'API key quota exceeded: 4990 of 5000 tokens used (monthly)'
                bad:
                  summary: Invalid parameters
                  value:
                    code: -1
                    msg: >-
                      lyrics is required when custom_mode is true and
                      instrumental is false
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
          headers: {}
      deprecated: false

````