Skip to content

Tme โ€‹

Updated

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

Tme is a music generation capability that creates music from a prompt and reference audio. Pass the reference audio in AudioInfos and specify the resource granted to your account with AdditionalParameters.ResourceId.

Basic Information โ€‹

ItemValue
ModelNameTme
SceneTypemusic

Provide a reference audio source and use ExtraParameters.ResourceId to specify the resource assigned to your account.

Request Parameters โ€‹

ParameterRequiredTypeDescription
ModelNameRequiredStringFixed value: Tme
SceneTypeRequiredStringmusic
PromptOptionalStringDescription of the generation direction
AudioInfos.NOptionalArrayReference audio source. AudioUrl field
ExtraParametersOptionalObjectResourceId (resource assigned to the account)
DurationOptionalIntegerDuration (seconds). 0~60
OutputAudioFormatOptionalStringmp3 or wav

The reference audio source URL must be externally accessible.

Request Example โ€‹

json
{
  "ModelName": "Tme",
  "SceneType": "music",
  "AudioInfos": [
    {
      "AudioUrl": "https://<cdn>/reference.wav"
    }
  ],
  "ExtraParameters": {
    "ResourceId": "<resource-id>"
  },
  "Operator": "admin"
}

The VOD path uses different reference fields

On the VOD path, AudioInfos.N uses the Type + Url structure, and the resource is specified in AdditionalParameters's ResourceId. The MPS path uses the AudioUrl field and ExtraParameters.ResourceId. If your code supports both paths, branch on the field names.

Response Example โ€‹

json
{
  "Response": {
    "Status": "DONE",
    "Message": "ok",
    "AudioInfos": [
      {
        "Url": "https://aigc-output-audio-file-<id>.cos.<region>.myqcloud.com/<file>.mp3?q-sign-algorithm=sha1&..."
      }
    ],
    "VideoInfos": ,
    "RequestId": "<request-id>"
  }
}

Built with VitePress ยท Deployed on Tencent EdgeOne Pages