TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AgentModelMultiembeddingCapacityRequest req = new AgentModelMultiembeddingCapacityRequest();
AgentModelMultiembeddingCapacityRequest.MultimodalContent obj1 = new AgentModelMultiembeddingCapacityRequest.MultimodalContent();
obj1.setImage("https://img.alicdn.com/imgextra/i3/O1CN01rdstgY1uiZWt8gqSL_!!6000000006071-0-tps-1970-356.jpg");
obj1.setMultiImages("https://img.alicdn.com/imgextra/i2/O1CN019eO00F1HDdlU4Syj5_!!6000000000724-2-tps-2476-1158.png,https://img.alicdn.com/imgextra/i2/O1CN01dSYhpw1nSoamp31CD_!!6000000005089-2-tps-1765-1639.png");
obj1.setText("量子计算是计算科学的一个前沿领域");
obj1.setVideo("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250107/lbcemt/new+video.mp4");
req.setMultimodalContents(obj1);
req.setOriginBizParams("{\"a\":\"aaaa\",\"b\",\"bbbbb\"}");
req.setModel("tongyi-embedding-vision-flash");
AgentModelMultiembeddingCapacityResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AgentModelMultiembeddingCapacityRequest req = new AgentModelMultiembeddingCapacityRequest();
AgentModelMultiembeddingCapacityRequest.MultimodalContentDomain obj1 = new AgentModelMultiembeddingCapacityRequest.MultimodalContentDomain();
obj1.Image = "https://img.alicdn.com/imgextra/i3/O1CN01rdstgY1uiZWt8gqSL_!!6000000006071-0-tps-1970-356.jpg";
obj1.MultiImages = "https://img.alicdn.com/imgextra/i2/O1CN019eO00F1HDdlU4Syj5_!!6000000000724-2-tps-2476-1158.png,https://img.alicdn.com/imgextra/i2/O1CN01dSYhpw1nSoamp31CD_!!6000000005089-2-tps-1765-1639.png";
obj1.Text = "量子计算是计算科学的一个前沿领域";
obj1.Video = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250107/lbcemt/new+video.mp4";
req.MultimodalContents_ = obj1;
req.OriginBizParams = "{\"a\":\"aaaa\",\"b\",\"bbbbb\"}";
req.Model = "tongyi-embedding-vision-flash";
AgentModelMultiembeddingCapacityResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AgentModelMultiembeddingCapacityRequest;
$multimodal_contents = new MultimodalContent;
$multimodal_contents->image="https://img.alicdn.com/imgextra/i3/O1CN01rdstgY1uiZWt8gqSL_!!6000000006071-0-tps-1970-356.jpg";
$multimodal_contents->multi_images="https://img.alicdn.com/imgextra/i2/O1CN019eO00F1HDdlU4Syj5_!!6000000000724-2-tps-2476-1158.png,https://img.alicdn.com/imgextra/i2/O1CN01dSYhpw1nSoamp31CD_!!6000000005089-2-tps-1765-1639.png";
$multimodal_contents->text="量子计算是计算科学的一个前沿领域";
$multimodal_contents->video="https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250107/lbcemt/new+video.mp4";
$req->setMultimodalContents(json_encode($multimodal_contents));
$req->setOriginBizParams("{\"a\":\"aaaa\",\"b\",\"bbbbb\"}");
$req->setModel("tongyi-embedding-vision-flash");
$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=taobao.agent.model.multiembedding.capacity' \
-d 'partner_id=apidoc' \
-d 'sign=80BDD5150F3E544C8D39F97B6A4948FC' \
-d 'sign_method=hmac' \
-d 'timestamp=2026-04-05+17%3A59%3A50' \
-d 'v=2.0' \
-d 'model=tongyi-embedding-vision-flash' \
-d 'multimodal_contents=multimodal_contents' \
-d 'origin_biz_params=%7B%5C%22a%5C%22%3A%5C%22aaaa%5C%22%2C%5C%22b%5C%22%2C%5C%22bbbbb%5C%22%7D'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AgentModelMultiembeddingCapacityRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.multimodal_contents="multimodal_contents"
req.origin_biz_params="{\"a\":\"aaaa\",\"b\",\"bbbbb\"}"
req.model="tongyi-embedding-vision-flash"
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,"taobao.agent.model.multiembedding.capacity");
add_param(pRequest,"multimodal_contents","数据结构JSON示例");
add_param(pRequest,"origin_biz_params","{\"a\":\"aaaa\",\"b\",\"bbbbb\"}");
add_param(pRequest,"model","tongyi-embedding-vision-flash");
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('taobao.agent.model.multiembedding.capacity', {
'multimodal_contents':'数据结构JSON示例',
'origin_biz_params':'{\"a\":\"aaaa\",\"b\",\"bbbbb\"}',
'model':'tongyi-embedding-vision-flash'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})