Domain name for API request: facefusion.tencentcloudapi.com.
This API is used to submit asynchronous processing tasks of video face fusion. After a task is submitted, the Job ID, estimated completion time, and current queue length will be returned.
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: SubmitVideoFaceFusionJob. |
Version | Yes | String | Common Params. The value used for this API: 2022-09-27. |
Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
ProjectId | Yes | String | Activity ID. Check it in the video face fusion console. |
ModelId | Yes | String | Material ID. Check it in the video face fusion console. |
MergeInfos.N | Yes | Array of MergeInfo | Face position information on the user face image and material template image. Only one entry is allowed. |
CelebrityIdentify | No | Integer | 0: inappropriate content recognition not required; 1: inappropriate content recognition required. Default value: 0. Note: Once the inappropriate content recognition service is enabled, you need to decide whether to adjust your business logic based on the returned results. For example, you need to replace the image if the system informs you that the image does not meet the requirements. Note: This field will be deprecated later due to business adjustments. It is not recommended for use. |
LogoParam | No | LogoParam | Video watermark logo parameter |
UserDesignatedUrl | No | String | COS pre-signed URL (PUT method). If this parameter is specified, the video after fusion will be uploaded to this URL. Note: If upload to this URL fails, the video will be uploaded to the default address of Tencent Cloud. |
UserIp | No | String | User IP address |
MetaData.N | No | Array of MetaData | Video metadata field |
Parameter Name | Type | Description |
---|---|---|
JobId | String | Job ID of the video face fusion task |
EstimatedProcessTime | Float | Estimated processing time of the video face fusion task, in seconds |
JobQueueLength | Integer | Estimated processing time of the video face fusion task, in seconds |
ReviewResultSet | Array of FuseFaceReviewResult | Inappropriate content recognition result. The element order of this array is the same as that of mergeinfo in the request, with a one-to-one relationship. Note: This field may return null, indicating that no valid values can be obtained. |
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. |
This example shows you how to submit video face fusion tasks.
POST / HTTP/1.1
Host: facefusion.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: SubmitVideoFaceFusionJob
<Common request parameters>
{
"ProjectId": "100646",
"MergeInfos": [
{
"Url": "http://i2.sinaimg.cn/ty/nba/2015-07-05/U10236P6T12D7648505F44DT20150705114547.jpg"
}
],
"ModelId": "qc_100646_154021_9"
}
{
"Response": {
"JobId": "C0a5EXaNR7JzGvlg",
"EstimatedProcessTime": 30,
"JobQueueLength": 1,
"ReviewResultSet": [
{
"Category": "Politics",
"Code": "0",
"CodeDescription": "OK",
"Suggestion": "PASS",
"Confidence": 30,
"DetailSet": [
{
"Field": "",
"Label": "Ding Junhui",
"Confidence": 30,
"Suggestion": "PASS"
}
]
}
],
"RequestId": "83ecff39-2e4a-41d5-8562-1f8898326565"
}
}
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 |
---|---|
FailedOperation.BalanceInsufficient | Insufficient balance, failed to open, please recharge and open again. |
FailedOperation.FaceIdNotInVideo | The face corresponding to the specified ID does not exist in the video. |
FailedOperation.FaceSizeTooSmall | The face was filtered because it was too small. It is recommended that the face size is not less than 34x34 pixels. |
FailedOperation.FuseMaterialNotAuth | The material has not been reviewed. |
FailedOperation.FuseMaterialNotAvailable | The material in this state cannot be used. |
FailedOperation.FuseMaterialNotExist | The material does not exist. |
FailedOperation.ImageDecodeFailed | Image decoding failed. |
FailedOperation.ImageDownloadError | Image download failed. |
FailedOperation.ImageResolutionExceed | The image size is too large. It is recommended to resize the image to below 2,000x2,000 pixels. |
FailedOperation.ImageResolutionTooSmall | The short edge resolution of the image is lower than 64 pixels. |
FailedOperation.ImageSizeExceed | The image after Base64 encoding exceeds in size. |
FailedOperation.ImageSizeInvalid | The image size is too large or too small and does not meet algorithm requirements. |
FailedOperation.InnerError | Internal service error. |
FailedOperation.NoFaceDetected | The face cannot be detected because the face box is too small. |
FailedOperation.ParameterValueError | Parameter or value is invalid. |
FailedOperation.ProjectNotAuth | The authorization fee is not paid for the activity, or the activity has been disabled. |
FailedOperation.RequestTimeout | The backend service timed out. |
FailedOperation.RpcFail | RPC request failed, typically due to algorithm service malfunction. |
FailedOperation.UnKnowError | Internal error. |
FailedOperation.Unknown | Unknown error. |
InvalidParameterValue.FaceRectParameterValueError | Face box parameters are invalid, or the face box is too small. |
InvalidParameterValue.UrlIllegal | The URL format is invalid. |
RequestLimitExceeded | The number of requests exceeded the rate limit. |
ResourceInsufficient | Resources are insufficient. |
ResourceNotFound | The resource does not exist. |
ResourceUnavailable.Freeze | The account has been frozen. |
ResourceUnavailable.InArrears | The account is in arrears. |
ResourceUnavailable.IsOpening | The service is being opened, please wait. |
ResourceUnavailable.NotExist | The billing status is unknown. Check whether the service has been activated in the console. |
ResourceUnavailable.Recover | The resource has been possessed. |
ResourceUnavailable.StopUsing | Services for the account has been stopped. |
本页内容是否解决了您的问题?