TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LianfanHuiwaImageAutomaticmattingSubmitRequest req = new LianfanHuiwaImageAutomaticmattingSubmitRequest();
LianfanHuiwaImageAutomaticmattingSubmitRequest.BaseImageTopRequest obj1 = new LianfanHuiwaImageAutomaticmattingSubmitRequest.BaseImageTopRequest();
LianfanHuiwaImageAutomaticmattingSubmitRequest.BaseImageRequest obj2 = new LianfanHuiwaImageAutomaticmattingSubmitRequest.BaseImageRequest();
obj2.setOriginalImageUrl("url");
obj2.setImageContentType(7L);
obj2.setMattingType(22L);
obj1.setMattingImageRequest(obj2);
req.setImageRequest(obj1);
LianfanHuiwaImageAutomaticmattingSubmitResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
LianfanHuiwaImageAutomaticmattingSubmitRequest req = new LianfanHuiwaImageAutomaticmattingSubmitRequest();
LianfanHuiwaImageAutomaticmattingSubmitRequest.BaseImageTopRequestDomain obj1 = new LianfanHuiwaImageAutomaticmattingSubmitRequest.BaseImageTopRequestDomain();
LianfanHuiwaImageAutomaticmattingSubmitRequest.BaseImageRequestDomain obj2 = new LianfanHuiwaImageAutomaticmattingSubmitRequest.BaseImageRequestDomain();
obj2.OriginalImageUrl = "url";
obj2.ImageContentType = 7L;
obj2.MattingType = 22L;
obj1.MattingImageRequest= obj2;
req.ImageRequest_ = obj1;
LianfanHuiwaImageAutomaticmattingSubmitResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new LianfanHuiwaImageAutomaticmattingSubmitRequest;
$image_request = new BaseImageTopRequest;
$matting_image_request = new BaseImageRequest;
$matting_image_request->original_image_url="url";
$matting_image_request->image_content_type="7";
$matting_image_request->matting_type="22";
$image_request->matting_image_request = $matting_image_request;
$req->setImageRequest(json_encode($image_request));
$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.image.automaticmatting.submit' \
-d 'partner_id=apidoc' \
-d 'sign=309266BFD460F30408682DC0C32E8264' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-12-06+18%3A10%3A25' \
-d 'v=2.0' \
-d 'image_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.LianfanHuiwaImageAutomaticmattingSubmitRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.image_request="数据结构示例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.image.automaticmatting.submit");
add_param(pRequest,"image_request","数据结构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.image.automaticmatting.submit', {
'image_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})