Skip to content

Google Lyria โ€‹

Updated

Endpoint: POST https://vod.intl.tencentcloudapi.comAction: CreateAigcAudioTask

Google Lyria is a music generation model: write the style and lyrics in a single prompt to generate a song (lyrics are written automatically if omitted), with 192 kbps output. 3.0-clip produces about 30 seconds for intros and short stings, while 3.0-pro produces about 2.5 minutes for full tracks.

Basic information โ€‹

ItemValue
ModelNameGL
ModelVersion3.0-clip / 3.0-pro
SceneTypemusic
Output bitrateFixed at 192 kbps

There are two versions: clip and full track.

Request parameters โ€‹

ParameterRequiredTypeDescription
ModelNameRequiredStringFixed value GL
ModelVersionOptionalString3.0-clip or 3.0-pro
SceneTypeRequiredStringmusic
PromptRequiredStringDescribe genre, instrumentation, mood, and tempo in detail

Request example โ€‹

json
{
  "SubAppId": 123456789,
  "ModelName": "GL",
  "ModelVersion": "3.0-clip",
  "SceneType": "music",
  "Prompt": "a warm acoustic guitar loop, gentle and hopeful, 90 bpm"
}
json
{
  "SubAppId": 123456789,
  "ModelName": "GL",
  "ModelVersion": "3.0-pro",
  "SceneType": "music",
  "Prompt": "an epic orchestral soundtrack, strings and brass, rising tension, cinematic finale"
}

Response example โ€‹

json
{
  "AigcAudioTask": {
    "Status": "FINISH",
    "ErrCode": 0,
    "Output": {
      "AudioInfos": [
        {
          "FileUrl": "http://<host>.vod2.myqcloud.com/.../aigcAudioGenFile.mp3"
        }
      ]
    }
  }
}

Lyrics and style โ€‹

Write lyrics and style together in a single Prompt. Do not use a separate lyrics field.

Special settings โ€‹

Version comparison โ€‹

Item3.0-clip3.0-pro
LengthAbout 30 secondsAbout 2 minutes 36 seconds
Processing timeShortLong
File sizeSmallLarge
Use caseIntro, short insert musicFinished track

Prompt-writing rules โ€‹

GL puts lyrics and style into one prompt. Choose the format that fits your use case from the options below.

Specify both lyrics and style โ€‹

text
{style description}

Lyrics:
{lyrics}

Leave one blank line between the style description and the lyrics, and place the lyrics after the Lyrics: line.

json
{
  "SubAppId": 123456789,
  "ModelName": "GL",
  "ModelVersion": "3.0-pro",
  "SceneType": "music",
  "Prompt": "a warm acoustic folk ballad, fingerpicked guitar, 84 bpm\n\nLyrics:\nThe morning light falls on the empty street\nI walk alone but the city breathes with me",
  "OutputConfig": {
    "StorageMode": "Temporary",
    "OutputAudioFormat": "mp3"
  }
}

Specify style only โ€‹

If you omit the lyrics field, the model generates lyrics automatically.

json
{
  "SubAppId": 123456789,
  "ModelName": "GL",
  "ModelVersion": "3.0-clip",
  "SceneType": "music",
  "Prompt": "a warm acoustic guitar loop, gentle and hopeful, 90 bpm",
  "OutputConfig": {
    "StorageMode": "Temporary",
    "OutputAudioFormat": "mp3"
  }
}

Create instrumental only โ€‹

Append instrumental, no vocals. after the style description.

json
{
  "SubAppId": 123456789,
  "ModelName": "GL",
  "ModelVersion": "3.0-pro",
  "SceneType": "music",
  "Prompt": "an epic orchestral soundtrack, strings and brass, rising tension, cinematic finale, instrumental, no vocals.",
  "OutputConfig": {
    "StorageMode": "Temporary",
    "OutputAudioFormat": "mp3"
  }
}

Lyrics only take effect when the format is followed

The Lyrics: marker and the blank lines before and after it are required for the model to recognize the lyrics. If the format is off, the lyrics are treated as a style description.

Output format โ€‹

Specify the result file format with OutputConfig.OutputAudioFormat.

json
{
  "OutputConfig": {
    "StorageMode": "Temporary",
    "OutputAudioFormat": "mp3"
  }
}

The output bitrate is fixed at 192 kbps

GL's output bitrate is 192 kbps.

Additional options โ€‹

GL's lyrics are included directly in the prompt. For 3.0-pro, write genre / instruments / tempo / mood in detail.

Built with VitePress ยท Deployed on Tencent EdgeOne Pages