tencent cloud

APIs

CreateSceneAigcImageTask

Download
Focus Mode
Font Size
Last updated: 2026-09-18 16:51:07

1. API Description

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

This API is used to generate scenario-based AIGC images. API calls incur actual fees. Refer to the VOD AIGC image generation billing document. The feature uses the postpaid settlement mode. For daily billing customers, usage on the day is billed on the second day. For monthly billing customers, the previous month's usage fees are billed on the 1st of the next month.

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 Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateSceneAigcImageTask.
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 Yes Integer VOD app ID. Customers who activate on-demand services from December 25, 2023 must fill in this field with the app ID when accessing resources in on-demand applications (whether the default application or a newly created application).
SceneInfo Yes AigcImageSceneInfo Scenario-based image generation parameter configuration.
FileInfos.N No Array of SceneAigcImageTaskInputFileInfo Input image list. Supported image formats: jpg, jpeg, png, webp. Different scenarios require different input data.

- AI outfit change scenario: Input Only 1 model image.
- AI product image generation scenario: manually input 1–10 images of the same product from different angles.
OutputConfig No SceneAigcImageOutputConfig Output media file configuration for scenario-based image generation tasks.
SessionId No String An identification code for deduplication. If there has been a request with the same identification code within the past 3 days, an error will be returned for the current request. The maximum length is 50 characters. Leaving it blank or using an empty string indicates no deduplication.
SessionContext No String Source context, used to pass through user request information. The audio and video quality revival complete callback will return the value of this field. Max length: 1000 characters.
TasksPriority No Integer Task Priority. The higher the value, the higher the priority. The value range is from -10 to 10. If left blank, the default value is 0.
ExtInfo No String Reserved field, used for special purposes.

3. Output Parameters

Parameter Name Type Description
TaskId String Task ID.
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.

4. Example

Example1 Trigger a task to generate scenario-based AIGC images

Input Example

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

{
    "SubAppId": 251440382,
    "SceneInfo": {
        "Type": "change_clothes",
        "ChangeClothesConfig": {
            "ClothesFileInfos": [
                {
                    "FileId": "3704211***509819"
                }
            ]
        }
    },
    "FileInfos": [
        {
            "FileId": "3704211***509820"
        }
    ],
    "OutputConfig": {
        "StorageMode": "Temporary",
        "MediaName": "myfile",
        "ClassId": 0
    },
    "SessionId": "mysession",
    "SessionContext": "mySessionContext",
    "TasksPriority": 10,
    "ExtInfo": "myextinfo"
}

Output Example

{
    "Response": {
        "RequestId": "3185a050-c13a-4119-83a2-ed55802034c7",
        "TaskId": "251440382-SceneAigcImageTask-*****8a5d76bcacaaec9a6d823e4t"
    }
}

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 Code Description
FailedOperation Operation failed.
FailedOperation.InvalidVodUser The VOD service is not activated.
InternalError Internal error.
InvalidParameter Parameter 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.
InvalidParameterValue.SubAppId Parameter value error: app ID.
LimitExceeded.Quota The quota limit is exceeded.
UnauthorizedOperation Unauthorized operation.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback