TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LianfanHuiwaTaskVideoSubmitRequest req = new LianfanHuiwaTaskVideoSubmitRequest();
LianfanHuiwaTaskVideoSubmitRequest.BatchGenVideoTopReq obj1 = new LianfanHuiwaTaskVideoSubmitRequest.BatchGenVideoTopReq();
LianfanHuiwaTaskVideoSubmitRequest.BatchGenVideoRequest obj2 = new LianfanHuiwaTaskVideoSubmitRequest.BatchGenVideoRequest();
List<LianfanHuiwaTaskVideoSubmitRequest.GenVideoRequest> list4 = new ArrayList<LianfanHuiwaTaskVideoSubmitRequest.GenVideoRequest>();
LianfanHuiwaTaskVideoSubmitRequest.GenVideoRequest obj5 = new LianfanHuiwaTaskVideoSubmitRequest.GenVideoRequest();
list4.add(obj5);
obj5.setDuration(5L);
obj5.setPassThrough("{}");
obj5.setDescription("天上下着雨");
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoInputImgDTO obj7 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoInputImgDTO();
List<LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTO> list9 = new ArrayList<LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTO>();
LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTO obj10 = new LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTO();
list9.add(obj10);
obj10.setOriginalImageUrl("https://img.alicdn.com/imgextra/i2/2217654845903/O1CN01JhFZiG1tTcwJqSUj9_!!2217654845903-0-aigc_business_user.jpg");
obj7.setImageInfoList(list9);
List<LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTO> list12 = new ArrayList<LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTO>();
LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTO obj13 = new LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTO();
list12.add(obj13);
obj13.setImageUrl("https://img.alicdn.com/imgextra/i2/2217654845903/O1CN01JhFZiG1tTcwJqSUj9_!!2217654845903-0-aigc_business_user.jpg");
obj7.setLastFrameList(list12);
list6.setInputImages(obj7);
obj5.setNegDescription("抖动");
obj5.setGenRatio("3:4");
obj5.setCustomVideoMode("std");
obj5.setCount(1L);
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateGroupDTO obj15 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateGroupDTO();
List<LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateDTO> list17 = new ArrayList<LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateDTO>();
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateDTO obj18 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateDTO();
list17.add(obj18);
obj18.setTemplateId("1");
obj18.setVideoUrl("https://cloud.video.taobao.com/vod/l-iiwZUuAPIo0Um-EyEFYjl0cRB3ZajC5CouGjz7Kf8.mp4");
obj15.setTemplateList(list17);
obj15.setPerTmplOutputSize(8L);
list14.setVideoTemplates(obj15);
obj5.setSubAction(1L);
List<LianfanHuiwaTaskVideoSubmitRequest.AigcVideoMaterialDTO> list21 = new ArrayList<LianfanHuiwaTaskVideoSubmitRequest.AigcVideoMaterialDTO>();
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoMaterialDTO obj22 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoMaterialDTO();
list21.add(obj22);
obj22.setVideoUrl("https://cloud.video.taobao.com/vod/l-iiwZUuAPIo0Um-EyEFYjl0cRB3ZajC5CouGjz7Kf8.mp4");
list19.setInputVideos(list21);
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoAdvancedConfigDTO obj24 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoAdvancedConfigDTO();
obj24.setToneStyleId("general");
obj24.setOpenSubtitle(true);
obj24.setKeepOriginalAudio(false);
list23.setAdvancedConfig(obj24);
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoItemInfoDTO obj26 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoItemInfoDTO();
obj26.setItemName("小黑金香水");
obj26.setItemSellingpoint("方方瓶身沉稳大气;英文标签很有质感;玻璃瓶身拿在手里有分量;香水礼盒包装送礼有面子;盒子背面有使用说明;金色瓶盖小细节设计");
list25.setItemInfo(obj26);
obj2.setGenVideoRequests(list4);
obj2.setTaskBizType(16L);
obj2.setSubTaskType(22L);
obj1.setRequest(obj2);
req.setBatchGenVideoTopReq(obj1);
LianfanHuiwaTaskVideoSubmitResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
LianfanHuiwaTaskVideoSubmitRequest req = new LianfanHuiwaTaskVideoSubmitRequest();
LianfanHuiwaTaskVideoSubmitRequest.BatchGenVideoTopReqDomain obj1 = new LianfanHuiwaTaskVideoSubmitRequest.BatchGenVideoTopReqDomain();
LianfanHuiwaTaskVideoSubmitRequest.BatchGenVideoRequestDomain obj2 = new LianfanHuiwaTaskVideoSubmitRequest.BatchGenVideoRequestDomain();
List<LianfanHuiwaTaskVideoSubmitRequest.GenVideoRequestDomain> list4 = new List<LianfanHuiwaTaskVideoSubmitRequest.GenVideoRequestDomain>();
LianfanHuiwaTaskVideoSubmitRequest.GenVideoRequestDomain obj5 = new LianfanHuiwaTaskVideoSubmitRequest.GenVideoRequestDomain();
list4.Add(obj5);
obj5.Duration = 5L;
obj5.PassThrough = "{}";
obj5.Description = "天上下着雨";
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoInputImgDTODomain obj6 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoInputImgDTODomain();
List<LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTODomain> list8 = new List<LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTODomain>();
LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTODomain obj9 = new LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTODomain();
list8.Add(obj9);
obj9.OriginalImageUrl = "https://img.alicdn.com/imgextra/i2/2217654845903/O1CN01JhFZiG1tTcwJqSUj9_!!2217654845903-0-aigc_business_user.jpg";
obj6.ImageInfoList= list8;
List<LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTODomain> list11 = new List<LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTODomain>();
LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTODomain obj12 = new LianfanHuiwaTaskVideoSubmitRequest.VideoInputImageDTODomain();
list11.Add(obj12);
obj12.ImageUrl = "https://img.alicdn.com/imgextra/i2/2217654845903/O1CN01JhFZiG1tTcwJqSUj9_!!2217654845903-0-aigc_business_user.jpg";
obj6.LastFrameList= list11;
obj5.InputImages= obj6;
obj5.NegDescription = "抖动";
obj5.GenRatio = "3:4";
obj5.CustomVideoMode = "std";
obj5.Count = 1L;
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateGroupDTODomain obj13 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateGroupDTODomain();
List<LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateDTODomain> list15 = new List<LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateDTODomain>();
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateDTODomain obj16 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoTemplateDTODomain();
list15.Add(obj16);
obj16.TemplateId = "1";
obj16.VideoUrl = "https://cloud.video.taobao.com/vod/l-iiwZUuAPIo0Um-EyEFYjl0cRB3ZajC5CouGjz7Kf8.mp4";
obj13.TemplateList= list15;
obj13.PerTmplOutputSize = 8L;
obj5.VideoTemplates= obj13;
obj5.SubAction = 1L;
List<LianfanHuiwaTaskVideoSubmitRequest.AigcVideoMaterialDTODomain> list18 = new List<LianfanHuiwaTaskVideoSubmitRequest.AigcVideoMaterialDTODomain>();
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoMaterialDTODomain obj19 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoMaterialDTODomain();
list18.Add(obj19);
obj19.VideoUrl = "https://cloud.video.taobao.com/vod/l-iiwZUuAPIo0Um-EyEFYjl0cRB3ZajC5CouGjz7Kf8.mp4";
obj5.InputVideos= list18;
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoAdvancedConfigDTODomain obj20 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoAdvancedConfigDTODomain();
obj20.ToneStyleId = "general";
obj20.OpenSubtitle = true;
obj20.KeepOriginalAudio = false;
obj5.AdvancedConfig= obj20;
LianfanHuiwaTaskVideoSubmitRequest.AigcVideoItemInfoDTODomain obj21 = new LianfanHuiwaTaskVideoSubmitRequest.AigcVideoItemInfoDTODomain();
obj21.ItemName = "小黑金香水";
obj21.ItemSellingpoint = "方方瓶身沉稳大气;英文标签很有质感;玻璃瓶身拿在手里有分量;香水礼盒包装送礼有面子;盒子背面有使用说明;金色瓶盖小细节设计";
obj5.ItemInfo= obj21;
obj2.GenVideoRequests= list4;
obj2.TaskBizType = 16L;
obj2.SubTaskType = 22L;
obj1.Request= obj2;
req.BatchGenVideoTopReq_ = obj1;
LianfanHuiwaTaskVideoSubmitResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new LianfanHuiwaTaskVideoSubmitRequest;
$batch_gen_video_top_req = new BatchGenVideoTopReq;
$request = new BatchGenVideoRequest;
$gen_video_requests = new GenVideoRequest;
$gen_video_requests->duration="5";
$gen_video_requests->pass_through="{}";
$gen_video_requests->description="天上下着雨";
$input_images = new AigcVideoInputImgDTO;
$image_info_list = new VideoInputImageDTO;
$image_info_list->original_image_url="https://img.alicdn.com/imgextra/i2/2217654845903/O1CN01JhFZiG1tTcwJqSUj9_!!2217654845903-0-aigc_business_user.jpg";
$input_images->image_info_list = $image_info_list;
$last_frame_list = new VideoInputImageDTO;
$last_frame_list->image_url="https://img.alicdn.com/imgextra/i2/2217654845903/O1CN01JhFZiG1tTcwJqSUj9_!!2217654845903-0-aigc_business_user.jpg";
$input_images->last_frame_list = $last_frame_list;
$gen_video_requests->input_images = $input_images;
$gen_video_requests->neg_description="抖动";
$gen_video_requests->gen_ratio="3:4";
$gen_video_requests->custom_video_mode="std";
$gen_video_requests->count="1";
$video_templates = new AigcVideoTemplateGroupDTO;
$template_list = new AigcVideoTemplateDTO;
$template_list->template_id="1";
$template_list->video_url="https://cloud.video.taobao.com/vod/l-iiwZUuAPIo0Um-EyEFYjl0cRB3ZajC5CouGjz7Kf8.mp4";
$video_templates->template_list = $template_list;
$video_templates->per_tmpl_output_size="8";
$gen_video_requests->video_templates = $video_templates;
$gen_video_requests->sub_action="1";
$input_videos = new AigcVideoMaterialDTO;
$input_videos->video_url="https://cloud.video.taobao.com/vod/l-iiwZUuAPIo0Um-EyEFYjl0cRB3ZajC5CouGjz7Kf8.mp4";
$gen_video_requests->input_videos = $input_videos;
$advanced_config = new AigcVideoAdvancedConfigDTO;
$advanced_config->tone_style_id="general";
$advanced_config->open_subtitle="true";
$advanced_config->keep_original_audio="false";
$gen_video_requests->advanced_config = $advanced_config;
$item_info = new AigcVideoItemInfoDTO;
$item_info->item_name="小黑金香水";
$item_info->item_sellingpoint="方方瓶身沉稳大气;英文标签很有质感;玻璃瓶身拿在手里有分量;香水礼盒包装送礼有面子;盒子背面有使用说明;金色瓶盖小细节设计";
$gen_video_requests->item_info = $item_info;
$request->gen_video_requests = $gen_video_requests;
$request->task_biz_type="16";
$request->sub_task_type="22";
$batch_gen_video_top_req->request = $request;
$req->setBatchGenVideoTopReq(json_encode($batch_gen_video_top_req));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=lianfan.huiwa.task.video.submit' \
-d 'partner_id=apidoc' \
-d 'sign=42B2FBC134575D3BA42BA9C3775EBB2B' \
-d 'sign_method=hmac' \
-d 'timestamp=2026-04-04+05%3A33%3A41' \
-d 'v=2.0' \
-d 'batch_gen_video_top_req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.LianfanHuiwaTaskVideoSubmitRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.batch_gen_video_top_req="数据结构示例JSON格式"
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"lianfan.huiwa.task.video.submit");
add_param(pRequest,"batch_gen_video_top_req","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'url': 'http://gw.api.taobao.com/router/rest'
});
client.execute('lianfan.huiwa.task.video.submit', {
'batch_gen_video_top_req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})