Domain name for API request: vod.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: 2018-07-17. |
| Region | No | String | Common Params. This parameter is not required. |
| SubAppId | No | Integer | VOD application ID. From December 25, 2023, customers who activate on-demand services must fill in this field with the app ID when accessing resources in on-demand applications, whether in the default application or a newly created application. |
| ModelName | No | String | Model name. |
| ModelVersion | No | String | Specify the model version number. By default, the system uses the supported stable version of the model. |
| SceneType | No | String | Designated scenarios. Currently supports sfx (sound effect) and music. |
| Prompt | No | String | Description of the generated audio |
| VideoInfos.N | No | Array of AigcAudioReferenceVideoInfo | Video information for reference. |
| AudioInfos.N | No | Array of AigcAudioReferenceAudioInfo | Specify the reference audio information. For example, this is required for music generation. |
| OutputConfig | No | AigcAudioOutputConfig | Output parameter |
| AdditionalParameters | No | String | Special scenario parameters required by the model, formatted as a JSON serialized string. |
| 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: vod.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAigcAudioTask
<Common request parameters>
{
"SubAppId": 251441341,
"ModelName": "MiniMaxMusic",
"ModelVersion": "2.0",
"SceneType": "music",
"Prompt": "A cheerful song",
"OutputConfig": {
"StorageMode": "Temporary",
"OutputAudioFormat": "mp3"
},
"AdditionalParameters": "{\"lyrics\": \"The sea is all water, the horse has four legs,***************\"}"
}
{
"Response": {
"TaskId": "251441341-AigcAudioTask-ed886585de73592fca966e81b6bc2d20t",
"RequestId": "a9a9e323-d543-4bd3-b638-5853763e90c7"
}
}
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 |
|---|---|
| InternalError | Internal error. |
| InvalidParameter.ViolationContent | InvalidParameter.ViolationContent |
| InvalidParameterValue | Parameter value error. |
| InvalidParameterValue.FileId | FileId does not exist. |
| InvalidParameterValue.SessionContextTooLong | SessionContext is too long. |
| InvalidParameterValue.SessionId | Duplicate recognition code. Request deduplicated. |
| InvalidParameterValue.SessionIdTooLong | SessionId is too long. |
文档反馈