Overview
Menu

CreateAigcAudioTask

Last updated: 2026-07-02 11:35:06Download PDF

1. API Description

Domain name for API request: mps.intl.tencentcloudapi.com.

This API is used to create AIGC audio generation tasks.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: CreateAigcAudioTask.
VersionYesStringCommon Params. The value used for this API: 2019-06-12.
RegionNoStringCommon Params. This parameter is not required.
ModelNameNoStringModel name. Currently supported models for music generation: GL, MinimaxMusic.Example value: MiniMaxMusic
ModelVersionNoStringSpecifies the model version. By default, the system uses the supported stable version of the model.Supported versions for GL: 2.0, 3.0-clip, 3.0-pro.Supported versions for MinimaxMusic: 2.0, 2.5, 2.6.Example value: 2.0
SceneTypeNoStringSpecifies the audio generation scene. Music: music.Example value: music
PromptNoStringDescription of the generated audio. (Note: Supports up to 2000 characters.) This parameter is required when no reference image is passed in.Example value: generate a piece of music
VideoInfos.NNoArray of AigcAudioReferenceVideoInfoReference video information. Only supported by certain models.
AudioInfos.NNoArray of AigcAudioReferenceAudioInfoReference audio information.For example, this parameter is required when generating music from a reference audio.
OutputAudioFormatNoStringOutput audio format. Empty by default. Supported values: mp3, wav.Example value: wav
StoreCosParamNoAigcStoreCosParamCOS bucket information for the file result. Note: COS is required and the MPS_QcsRole role needs to be created and authorized.
ExtraParametersNoAigcAudioExtraParamAdditional parameters required for the model.
AdditionalParametersNoStringUsed to input some special scene parameters required by the model, serialized into a string in JSON format.Example: when passing lyrics to the MinimaxMusic model:{"lyric":{"The pony runs happily, flowers are blooming"}}Example value: {"sequential_image_generation":"auto"}
OperatorNoStringAPI operator name.Example value: admin

3. Output Parameters

Parameter NameTypeDescription
TaskIdStringThe task ID returned after the task is created successfully.Call the query API to poll for task progress and the generation result.Example value: 24***AigcAudio-6a383a9f51468da5bfc25**9a462
RequestIdStringThe unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Request Example

Input Example

POST / HTTP/1.1
Host: mps.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAigcAudioTask
<Common request parameters>

{
    "ModelName": "Tme",
    "ModelVersion": "1.0",
    "SceneType": "music",
    "Prompt": "generate a piece of music",
    "VideoInfos": [
        {
            "VideoUrl": "https://l***-******-tts-131140***2.c***ap-*ua****ou.myqcloud.com/251006278_1513228070381297256.mp4"
        }
    ],
    "AudioInfos": [
        {
            "AudioUrl": "https://li**-q*******ts-1311402212*cos*ap-guangzh****yqcloud.com/25*******_1513228070381297256.wav"
        }
    ],
    "OutputAudioFormat": "wav",
    "ExtraParameters": {
        "ResourceId": "438910555_1"
    },
    "AdditionalParameters": "{\"sequential_image_generation\":\"auto\"}",
    "Operator": "admin"
}

Output Example

{
    "Response": {
        "TaskId": "24*******AigcAudio-6a38**3a9f51468da5bfc25****9a462",
        "RequestId": "fcc72969-6464-45ba-8369-232f7a1e1c76"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error CodeDescription
InvalidParameter.ViolationContentReview blocklist for user-submitted input.