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);
list6.setInputImages(obj7);
obj5.setNegDescription("抖动");
obj5.setGenRatio("3:4");
obj5.setCustomVideoMode("std");
obj2.setGenVideoRequests(list4);
obj2.setTaskBizType(16L);
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;
obj5.InputImages= obj6;
obj5.NegDescription = "抖动";
obj5.GenRatio = "3:4";
obj5.CustomVideoMode = "std";
obj2.GenVideoRequests= list4;
obj2.TaskBizType = 16L;
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;
$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";
$request->gen_video_requests = $gen_video_requests;
$request->task_biz_type="16";
$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=12CDBD8DCA9B92CDF39B9F740A76C1AC' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-12-06+18%3A10%3A25' \
-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',
'REST_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);
})