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

# Cadence Song

> Generate a full song, vocals and accompaniment together, from your `lyrics` and a `style` description.

- `duration` sets the **maximum length** in seconds (10 to 360) and is the billed length. The song follows your lyrics: when they finish earlier, the song ends earlier. When the song reaches `duration`, it fades out over the last 3 seconds.
- Longer lyrics need a longer `duration`; roughly 60 to 90 seconds per verse and chorus.
- Generation takes about as long as the requested length.

**Pricing**: 0.02 tokens ($0.0004) per second of audio, rounded up to the whole second.

| Option | Tokens | USD |
|---|---|---|
| Per second of audio | 0.02 | $0.0004 |

**Result**: one `json` item `{ "type": "audio", "value": "https://...mp3" }` (a `.wav` link when `output_format` is `wav`), 48 kHz stereo. Result links expire (see `link_expired_at`).



## OpenAPI

````yaml api-reference/audio-generations/openapi-cadence-song.json POST /api/v1/audio/generations
openapi: 3.1.0
info:
  title: GoEnhance API - Cadence Song
  description: Write a full song from your lyrics and a style description.
  version: 1.0.0
servers:
  - url: https://api.goenhance.ai
security: []
paths:
  /api/v1/audio/generations:
    post:
      tags:
        - AudioGenerations
      summary: Cadence Song
      description: >-
        Generate a full song, vocals and accompaniment together, from your
        `lyrics` and a `style` description.


        - `duration` sets the **maximum length** in seconds (10 to 360) and is
        the billed length. The song follows your lyrics: when they finish
        earlier, the song ends earlier. When the song reaches `duration`, it
        fades out over the last 3 seconds.

        - Longer lyrics need a longer `duration`; roughly 60 to 90 seconds per
        verse and chorus.

        - Generation takes about as long as the requested length.


        **Pricing**: 0.02 tokens ($0.0004) per second of audio, rounded up to
        the whole second.


        | Option | Tokens | USD |

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

        | Per second of audio | 0.02 | $0.0004 |


        **Result**: one `json` item `{ "type": "audio", "value":
        "https://...mp3" }` (a `.wav` link when `output_format` is `wav`), 48
        kHz stereo. Result links expire (see `link_expired_at`).
      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:
                    - cadence-song
                  description: Model name. Must be `cadence-song`.
                style:
                  type: string
                  maxLength: 1000
                  description: >-
                    Describe the music: language, genre, instruments, vocal,
                    mood and tempo, comma-separated works best, e.g. `Mandarin
                    pop, warm female vocal, piano, strings, 90 BPM, emotional`.
                    Max 1000 characters.
                lyrics:
                  type: string
                  maxLength: 4000
                  description: >-
                    Lyrics to sing, with `\n` between lines. Section tags such
                    as `[Verse]`, `[Chorus]`, `[Bridge]`, `[Intro]`, `[Outro]`
                    are recommended. Chinese and English are supported. Max 4000
                    characters.
                duration:
                  type: integer
                  minimum: 10
                  maximum: 360
                  description: >-
                    Required. Maximum length of the song in seconds, 10 to 360.
                    This is the billed length: you pay for `duration` seconds
                    even when the song ends earlier.
                seed:
                  type: integer
                  minimum: 0
                  maximum: 2147483647
                  description: >-
                    Optional. The same seed and inputs give the same result.
                    Random when omitted.
                output_format:
                  type: string
                  enum:
                    - mp3
                    - wav
                  default: mp3
                  description: '`mp3` (320 kbps, default) or `wav` (16-bit). 48 kHz stereo.'
                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
                - style
                - lyrics
                - duration
            example:
              model: cadence-song
              style: >-
                Mandarin pop, warm female vocal, piano, strings, 90 BPM,
                emotional
              lyrics: |-
                [Verse]
                晚风穿过城市的灯
                我把心事写进歌声

                [Chorus]
                让这首歌飞过长空
                带着思念不再沉重
              duration: 60
      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.2
                    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.2
                '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: >-
                      duration is required: the maximum length in seconds
                      (10-360), which is also the billed length
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
          headers: {}
      deprecated: false

````

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