Domain name for API request: mps.intl.tencentcloudapi.com.
This API is used to create AI audio generation tasks.
A maximum of 20 requests can be initiated per second for this API.
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 Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateAigcAudioTask. |
| Version | Yes | String | Common Params. The value used for this API: 2019-06-12. |
| Region | No | String | Common Params. This parameter is not required. |
| ModelName | No | String | Model name. Supported models for music generation: GL and MiniMaxMusic. |
| ModelVersion | No | String | Specifies the model version. By default, the system uses the supported stable version of the model. |
| SceneType | No | String | Specifies the scenario for audio generation. Music: music. |
| Prompt | No | String | Description of the generated video. (Note: A maximum of 2000 characters is supported.) This parameter is required when no reference image is specified. |
| VideoInfos.N | No | Array of AigcAudioReferenceVideoInfo | Reference video information, which is supported by some models. |
| AudioInfos.N | No | Array of AigcAudioReferenceAudioInfo | Specify the reference audio information. For example, this is required for music generation. |
| OutputAudioFormat | No | String | Output audio format. By default, this is not specified. Valid values: mp3 and wav. |
| StoreCosParam | No | AigcStoreCosParam | COS bucket information for the file result. Note: COS is required and the MPS_QcsRole role needs to be created and authorized. |
| ExtraParameters | No | AigcAudioExtraParam | Additional parameters required. |
| AdditionalParameters | No | String | This is used to specify special scenario parameters required by the model, in the format of a serialized JSON string. |
| Operator | No | String | API operator name. |
| Parameter Name | Type | Description |
|---|---|---|
| TaskId | String | Returned task ID after the task is created successfully. |
| RequestId | String | The 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. |
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"
}
{
"Response": {
"TaskId": "24*******AigcAudio-6a38**3a9f51468da5bfc25****9a462",
"RequestId": "fcc72969-6464-45ba-8369-232f7a1e1c76"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| InvalidParameter.ViolationContent | Review blocklist for user-submitted input. |
피드백