Skip to content

Multimodal embedding API

Reference, synced 2026-06-13.

flowchart TD
  n0["Models"]
  n1["Overview"]
  n2["Products"]
  n3["Solutions"]
  n4["Pricing"]
  n5["Resources"]
  n6["Partners"]
  n7["Support"]
  n8["Language"]
  n0 --> n1
  n1 --> n2
  n2 --> n3
  n3 --> n4
  n4 --> n5
  n5 --> n6
  n6 --> n7
  n7 --> n8

Free access Accelerate Delivery with Fixed-Cost Agentic CodingWatch how it works

Models

Empowering AI innovation for both enterprises and developers with Alibaba Cloud’s best-in-class Qwen models, AI-native apps, and AI solutions.

Alibaba Cloud Model Studio \ Enterprise-grade large model service and application development platform.

Try Visual Model \ Supports image understanding, image generation, and video generation.

Models

HappyHorse-1.0-T2V \ Cinematic creative generation, ultimate dynamic details Qwen3-VL-Plus \ Native VL, spatial reasoning, 1M-context video analysis Wan2.7-VideoEdit \ Supports both localized and global editing with prompt

Qwen3.6-Plus \ Native multimodal, 1M context, agentic coding Wan2.7-Image-Pro \ Interactive editing, long-text rendering, precise prompt following Qwen-Plus \ Balanced intelligence, efficient inference, production-ready performance

Qwen-Image-2.0 \ Professional infographics, exquisite photorealism Z-Image-Turbo \ Ultra-fast image generation, high throughput, cost-optimized inference Qwen3-Coder-Next \ Multi-turn tool interactions, future-ready development support

Wan2.7-T2V \ High-fidelity T2V, 15s duration, advanced camera control Wan2.7-I2V \ Cinematic I2V with emotional depth and visceral impact Wan2.7-R2V \ Up to 5 mixed image/video inputs and audio timbre cloning

GenAI Application

Qoder \ Intelligent coding assistant, available for enterprise-dedicated deployment. Qoder CN \ AI-powered coding assistant that boosts developer productivity with intelligent code completion, AI chat, multi-file editing, and task automation.

AI Service

Model Experience \ Experience full-scale, multimodal model capabilities online. Platform for AI \ An AI-native algorithm engineering platform for end-to-end modeling, training, and inference service deployment. Fine-tune Video Generation Model \ Customize Wan’s text-to-video capabilities through model fine-tuning to meet your unique requirements.

AI Use Case

AI Savings Plan Hot \ Save up to 47% on AI costs. Limited-time offer tailored to your usage. AI Video Creation \ Elevate your professional video production with Wan 2.6.

AI Token Plan \ One plan. Multiple models. Big Savings with a Fixed Subscription. AI Image Creation \ All-in-one creative suite for copywriting, image generation, and poster design.

Overview

As a global full-stack AI leader, Alibaba Cloud aims to make computing accessible to everyone and help worldwide customers accelerate innovation.

Why Alibaba Cloud

About Alibaba Cloud \ AI Powered Cloud Technology Our Global Network \ Explore our global presence and deployment regions around the world Our Global Offices \ With offices in 4 continents, we're always close to where it matters.

Asia Accelerator \ Accelerate Success in Asia with Alibaba Cloud Go Global \ Benefits of our Global Alliance Trust Center \ Empowering enterprises with a secure, compliant, and globally trusted cloud infrastructure

Customers and Insights

Olympic Games \ Alibaba Cloud Powers Olympic Games with AI-powered cloud technology Case Studies \ Learn how customers are scaling their businesses on Alibaba Cloud Analyst Reports \ Learn what the top industry analyst firms are saying about Alibaba Cloud

What's New

Events and Webinars \ Quick access to upcoming and on-demand events Product Updates \ Stay informed of the latest innovations Press Room \ Latest news and media releases

Products

Featured ProductsAI & Machine Learning Computing Container Storage Networking & CDN Security Middleware Database Analytics ComputingMedia ServicesEnterprise Services & Cloud CommunicationDomain Names and WebsitesEnd User ComputingServerlessDeveloper ToolsMigration & O&M ManagementApsara Stack

Alibaba Cloud Model Studio \ Supercharge your AI journey effortlessly with industry-leading GenAI models ApsaraDB RDS \ Store and manage your business data, with automated monitoring and backups Certificate Management Service (Original SSL Certificate) \ Create a safe and secure connection between your website and users

Elastic Compute Service (ECS) \ Host websites anywhere and scale enterprise workloads Container Service for Kubernetes (ACK) \ Run and scale containerized applications on managed Kubernetes infrastructure Object Storage Service (OSS) \ Store large amounts of data in the cloud and access it anywhere, anytime

Simple Application Server (SAS) \ All-in-one services for fast deployment Elastic IP Address (EIP) \ Manage your public IPs independently to improve internet network quality Domain Names and Website \ Get the perfect domain name to suit your every need

Solutions

Solutions by Industry Technical Solutions AI WebsitesNetworking Security and ComplianceData and AnalyticsEnterprise Service and ApplicationCloud MigrationCloud NativeHybrid CloudSMB solutions

Financial Services \ Innovate faster with Alibaba Cloud Games \ Grow your game rapidly with high global availability

New Retail \ Alibaba Cloud enables digital retail transformation to fuel growth and realize an omnichannel customer experience throughout the consumer journey. Media and Entertainment \ Ready your content for today's media market with a digitalized media journey

Supply Chain \ Power your supply chain with intelligent, efficient, and reliable solutions Sports \ Digitizing the sports industry with intelligent tech

Sustainability \ Achieve a sustainable future with low-carbon and energy-efficient technologies

Pricing

Flexible options like pay-as-you-go and clear billing rules to meet diverse business needs.

Overview & Tools

Pricing Calculator \ Get an instant pricing estimate based on your usage and needs Free Trial \ Try our 80+ cloud products for free.

Pricing Options \ Get the most out of Alibaba Cloud with flexible pricing

Optimize your cost

Migrate & Save \ Superior Performance At Lower Pricing. Save up to 50%. Promotion Center \ Unlock the latest Alibaba Cloud offers & promos

Resources

Official documentation, extensive tools, training resources, and a community to grow and innovate in the cloud.

Technical Resources

Documentation \ Product guides and FAQs Architecture Center \ Design reliable, secure, and efficient cloud architecture. Intelligent Solution Explorer \ Find the right solution for you, powered by AI

Blog \ Latest cloud insights and developer trends Whitepapers \ Research that explores the how and why behind our technology

Training&Certification

Alibaba Cloud Academy \ Build cloud skills and earn certifications with expert-led training.

Developer Hub

Alibaba Cloud Project Hub \ Explore real-world projects built by developers using our platform. Our Developer MVPs \ Celebrating the developers who lead, build, and inspire our community

Partners

Partner-first strategy offering collaborative product, sales, and service models, plus high-quality partner solutions that complement Alibaba Cloud’s capabilities.

Marketplace

AI Alliance for ISVs \ Partner with us to build and grow AI solutions together ISV Benefits \ Unlock resources, market access, and go-to-market support as an ISV partner

Alibaba Cloud Marketplace \ Explore ready-to-deploy solutions from our partners and ISVs

Find a Partner

Partner Hub \ Find your ideal partner in no time

Become a Partner

Partner Network \ A partner portal for Alibaba Cloud Channel, Technology, MSP partner and other partner programs

Support

Full-lifecycle support and expert services, from cloud advisory and migration to operations.

Support & Professional Services

Professional Services \ Expert-led services to design, migrate, and optimize your cloud journey Support Plans \ Flexible support for every stage — from startup to enterprise

Partner Support Program \ Priority technical support for partners, with dedicated managers and faster issue resolution

Contact us

Connect With Us \

Talk to a sales expert and get a custom quote for your business

Language

  • English
  • 简体中文
  • 繁體中文
  • 日本語
  • Bahasa Indonesia

Locale

Visit aliyun.com

Documentation

Alibaba Cloud Model Studio

User Guide (Models) User Guide (Application) API Reference (Models) API Reference (Application)

Search for Help Content

Getting Started

The Beginner's Guide

Well-Architected Framework

AI & Machine Learning

Platform For AI

Alibaba Cloud Model Studio

DashVector

Artificial Intelligence Recommendation

OpenSearch

Image Search

Machine Translation

Intelligent Speech Interaction

Optimization Solver

Intelligent Computing LINGJUN

Computing

Elastic Compute Service

Elastic GPU Service

Elastic Container Instance

Dedicated Host

Compute Nest

Simple Application Server

Cloud Box

Auto Scaling

Elastic High Performance Computing

Batch Compute (Deprecated)

Function Compute

Serverless App Engine

ENS

Elastic Desktop Service

App Streaming

WUYING Terminal

Cloud Phone

Edge Network Acceleration

Alibaba Cloud Linux

AgentBay

Container

Container Service for Kubernetes

Container Compute Service

Container Registry

Storage

Object Storage Service

Cloud Parallel File Storage

File Storage NAS

Tablestore

Storage Capacity Unit

Simple Log Service

Cloud Backup

Intelligent Media Management

Drive and Photo Service

Data Transport

Cloud Storage Gateway

Data Online Migration

Hybrid Cloud Storage Array

Storage Services Overview

Backup and Disaster Recovery Center

Networking and CDN

Server Load Balancer

Elastic IP Address

Internet Shared Bandwidth

Data Transfer Plan

Virtual Private Cloud

NAT Gateway

PrivateLink

Alibaba Cloud DNS PrivateZone

Network Intelligence Service

Cloud Data Transfer

IPv6 Gateway

Anycast Elastic IP Address

Cloud Enterprise Network

Global Accelerator

VPN Gateway

Smart Access Gateway

Express Connect

CDN

Edge Security Acceleration

Cloud Network Well-architected Design Guidelines

Security

Anti-DDoS

Web Application Firewall

Cloud Firewall

Security Center

Bastionhost

Secure Access Service Edge

Certificate Management Service

Key Management Service

Data Security Center

Identity as a Service

Fraud Detection

AI Guardrails

Captcha

Blockchain as a Service

ID Verification

Managed Security Service

Middleware

Enterprise Distributed Application Service

Microservices Engine

Alibaba Cloud Service Mesh

SchedulerX

ApsaraMQ for RocketMQ

ApsaraMQ for Kafka

ApsaraMQ for RabbitMQ

ApsaraMQ for MQTT

Simple Message Queue (formerly MNS)

CloudFlow

EventBridge

Application Real-Time Monitoring Service

Managed Service for Prometheus

Managed Service for Grafana

Managed Service for OpenTelemetry

Performance Testing

STAROps

Databases

ApsaraDB Console

PolarDB

ApsaraDB RDS

ApsaraDB for OceanBase (Deprecated)

Tair (Redis® OSS-Compatible)

Lindorm

Time Series Database

ApsaraDB for MongoDB

ApsaraDB for HBase

ApsaraDB for Memcache

ApsaraDB for MyBase

AnalyticDB

ApsaraDB for ClickHouse

ApsaraDB for SelectDB

Data Transmission Service

Database Autonomy Service

Data Management

Database Gateway - Deprecated

ApsaraDB for Cassandra - Deprecated

Analytics Computing

MaxCompute

Hologres

Realtime Compute for Apache Flink

Elasticsearch

Vector Retrieval Service for Milvus

E-MapReduce

Data Lake Formation

DataV

Quick BI

Quick Audience

Quick Tracking

DataWorks

DataHub

Dataphin

Media Services

ApsaraVideo VOD

ApsaraVideo Live

Intelligent Media Services

ApsaraVideo Media Processing

Apsara Video SDK

Enterprise Services & Cloud Communication

Energy Expert

CloudQuotation

Salesforce on Alibaba Cloud

GoChina ICP Filing Assistant

Marketplace

Alibaba Mail

Direct Mail

Short Message Service

Voice Service

Phone Number Verification Service

Cell Phone Number Service

Chat App Message Service

Financial Intelligence Engine

Domain Names and Websites

Domain Names

ICP Filing

Alibaba Cloud DNS

End User Computing

Elastic Desktop Service

App Streaming

WUYING Terminal

Cloud Phone

AgentBay

Internet of Things

IoT Platform

Serverless

Serverless App Engine

CloudFlow

EventBridge

Simple Message Queue (formerly MNS)

Function Compute

Developer Tools

OpenAPI Explorer

Alibaba Cloud SDK

Cloud Shell

Resource Orchestration Service

Alibaba Cloud CLI

BSS OpenAPI

Terraform

Pulumi

Ticket System API

Mobile Platform as a Service

Alibaba Cloud DevOps

API Gateway

Cloud Control API

AI Coding Assistant Lingma

Cloud Skills Portal

Migration & O&M Management

CloudOps Orchestration Service

Cloud Monitor

Intelligent Advisor

Cloud Governance Center

ActionTrail

Cloud Config

Resource Access Management

Resource Management

Cloud Architect Design Tools

Migration Hub

Server Migration Center

Service Catalog

Logic Composer

Quota Center

CloudSSO

HTTPDNS

Solutions

SAP

SuperApp

OpenLake

Membership Service

Expenses and Costs

Account Center

More

Support

Legal

Tech Share Terms and Conditions

After Sales Support

China Gateway Program

Service Level Objectives

Management Console

Security Control

This topic was translated by AI and is currently in queue for revision by our editors. Alibaba Cloud does not guarantee the accuracy of AI-translated content. Request expedited revision

Multimodal embedding models convert text, images, and videos into embeddings in a shared semantic space to enable cross-modal retrieval, content classification, and similarity search.

Core capabilities

  • Cross-modal retrieval: Perform semantic searches across different content types, such as text-to-image, image-to-video, or image-to-image.

  • Semantic similarity: Measure the semantic similarity between different content types in a unified embedding space.

  • Content classification and clustering: Group, label, and cluster content based on semantic embeddings.

Key feature: Embeddings for all modalities (text, images, and video) share the same semantic space, enabling direct cross-modal matching and comparison using methods such as cosine similarity. See text and multimodal embedding for details on model selection and usage.

Important

This model service is only available in the China (Beijing) region. To call the service, use an API key from this region.

Embedding types

The multimodal embedding model supports two methods for generating embeddings:

  • Multimodal independent embedding: Generates a separate embedding for each input, such as text, an image, a video, or multiple images, within the contents. For example, an input of one text string and one image returns two independent embeddings. This is ideal for comparing individual items, such as in image-to-image or text-to-image searches.

  • Multimodal fused embedding: Fuses all inputs in contents into a single embedding to achieve a unified cross-modal semantic representation. This is suitable for scenarios that require a holistic understanding of multimodal content, such as fusing a product image and its description text into a unified representation for retrieval. For qwen3-vl-embedding, you enable fusion by setting enable_fusion=true. The fused embedding supports the following combinations:

    • Text and image fusion

    • Text and video fusion

    • Fusing multiple images with text (by passing multiple image entries)

    • Fusion of images, video, and text

qwen2.5-vl-embedding supports only fused embeddings, not independent embeddings. tongyi-embedding-vision-plus and tongyi-embedding-vision-flash support only independent embeddings.

For model introductions, selection guidance, and usage instructions, see Text and multimodal embedding.

Model overview

Singapore

China (Beijing)

ModelEmbedding dimensionsText length limitImage size limitVideo size limitPrice (per 1M input tokens)Free quota (Note)
tongyi-embedding-vision-plus11521,024 tokensUp to 3 MB per image. Supports up to 8 images.Up to 10 MB per video fileImage/Video: $0.09 Text: $0.091 million tokens Valid for 90 days after activating Model Studio
tongyi-embedding-vision-flash768Image/Video: $0.03 Text: $0.09
ModelEmbedding dimensionsText length limitImage size limitVideo size limitPrice (per 1M input tokens)
qwen3-vl-embedding2560 (default), 2048, 1536, 1024, 768, 512, 25632,000 tokensUp to 5 images, up to 5 MB per imageUp to 50 MB per video fileImage/Video: $0.258 Text: $0.1
multimodal-embedding-v11024512 tokensUp to 8 images, 3 MB eachUp to 10 MB per video fileFree trial

Input formats and usage limits

Fused multimodal models
ModelTextImageVideoRequest limit
qwen3-vl-embeddingSupports 33 major languages, including Chinese, English, Japanese, Korean, French, and German.JPEG, PNG, WEBP, BMP, TIFF, ICO, DIB, ICNS, SGI (URL or Base64 supported)MP4, AVI, MOV (URL only)Up to 20 content elements per request, with a maximum of 5 images and 1 video.
Independent multimodal models
ModelTextImageVideoRequest limit
tongyi-embedding-vision-plusChinese and EnglishJPG, PNG, BMP (URL or Base64 supported)MP4, MPEG, MOV, MPG, WEBM, AVI, FLV, MKV (URL only)No limit on the number of content elements. The total number of input tokens must not exceed the batch processing token limit.
tongyi-embedding-vision-flash
multimodal-embedding-v1JPG, PNG, BMP (URL or Base64 supported)Up to 20 content elements per request, with a maximum of 20 text segments, 1 image, and 1 video.

All models accept text, image, and video inputs, individually or in combination. tongyi-embedding-vision-plus, tongyi-embedding-vision-flash models also support multi_images for image sequences.

Model capabilities

ModelDefault dimensionVector typeSupported inputsDescription
qwen3-vl-embedding2560Independent / Fusiontext, image, video, multiple imagesFusion mode, enabled with the enable_fusion parameter, combines multimodal inputs into a single vector.
tongyi-embedding-vision-plus1152Independent onlytext, image, video, multi_imagesSupports multi_images sequences (up to 8 images).
tongyi-embedding-vision-flash768
multimodal-embedding-v11024text, image, videoThe vector dimension is fixed at 1,024 and cannot be configured.

Prerequisites

Obtain an API key and export the API key as an environment variable. If you use an SDK to make calls, install the DashScope SDK.

HTTP call

POST https://dashscope.aliyuncs.com/api/v1/services/embeddings/multimodal-embedding/multimodal-embedding

### RequestMultimodal independent embedding Multimodal fused embedding > The following example uses the tongyi-embedding-vision-plus model to generate an independent embedding for each input. You can replace the model name with another supported model. The multi_images type is supported only by tongyi-embedding-vision-plus and tongyi-embedding-vision-flash. The qwen3-vl-embedding model also supports a fused embedding mode, which you can enable by setting enable_fusion=true. For details, see the "Multimodal fused embedding" tab. curl curl --silent --location --request POST 'https://dashscope.aliyuncs.com/api/v1/services/embeddings/multimodal-embedding/multimodal-embedding' \ --header "Authorization: Bearer $DASHSCOPE_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "model": "tongyi-embedding-vision-plus", "input": { "contents": [ {"text": "Multimodal embedding model"}, {"image": "https://img.alicdn.com/imgextra/i3/O1CN01rdstgY1uiZWt8gqSL_!!6000000006071-0-tps-1970-356.jpg"}, {"video": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250107/lbcemt/new+video.mp4"}, {"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" ] } ] } }' > The qwen3-vl-embedding model supports fused embedding generation. Set enable_fusion=true to combine all inputs into a single embedding. This supports various combinations, such as text and image, text and video, multiple images and text, or a mix of image, video, and text. The following example shows a fusion of multiple images, a video, and text. curl curl --location 'https://dashscope.aliyuncs.com/api/v1/services/embeddings/multimodal-embedding/multimodal-embedding' \ --header "Authorization: Bearer $DASHSCOPE_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "model": "qwen3-vl-embedding", "input": { "contents": [ {"text": "Product description text"}, {"image": "https://dashscope.oss-cn-beijing.aliyuncs.com/images/256_1.png"}, {"image": "https://img.alicdn.com/imgextra/i3/O1CN01rdstgY1uiZWt8gqSL_!!6000000006071-0-tps-1970-356.jpg"}, {"video": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250107/lbcemt/new+video.mp4"} ] }, "parameters": { "enable_fusion": true } }'
#### Request headers
Content-Typestring (Required) The content type of the request. Must be application/json.
Authorizationstring (Required) Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx.
#### Request body
modelstring (required) The model name. Select a model from the Model overview.
inputobject (required) The input content. Properties contentsarray (required) The content items to process. Each item is a dictionary or string that specifies the content type and value in the format {"modality_type": "input_string_or_image/video_url"}. The supported modality types are textimagevideo, and multi_images. > The qwen3-vl-embedding model supports both fused and independent embedding generation. To generate a fused embedding, add the boolean field enable_fusion and set it to true. The qwen2.5-vl-embedding model supports only fused embeddings. - Text: The key is text, and the value is a string. You can also pass the string directly without a dictionary. - Image: Use the image key. The value can be a public URL or a Base64-encoded Data URI. The Base64 format is data:image/{format};base64,{data}, where {format} is the image format, such as jpeg or png, and {data} is the Base64-encoded string. - Multiple images: This type is supported only by the tongyi-embedding-vision-plus, tongyi-embedding-vision-flash models. The key is multi_images, and the value is a list of images. Each item in the list is an image that must follow the format described above. - Video: The key is video. The value must be a publicly accessible URL. parametersobject (optional) Embedding processing parameters. For HTTP calls, you must wrap these parameters in the parameters object. For SDK calls, you can use these parameters directly. Properties output_typestring (optional) The format for the output embedding representation. Currently, only dense is supported. dimensioninteger (optional) The output embedding dimension. Supported values vary by model: - qwen3-vl-embedding: Supports 2560, 2048, 1536, 1024, 768, 512, and 256. The default is 2560. - tongyi-embedding-vision-plus: Does not support this parameter. Returns a fixed 1152-dimension embedding. - tongyi-embedding-vision-flash: Does not support this parameter. Returns a fixed 768-dimension embedding. - multimodal-embedding-v1: Does not support this parameter. Returns a fixed 1024-dimension embedding. fpsfloat (optional) The video frame sampling rate. A smaller value extracts fewer frames. The valid range is [0, 1], and the default is 1.0. instructstring (optional) A custom task description to help the model understand the query's intent. English instructions are recommended and can improve performance by 1% to 5%. enable_fusionbool (optional) Specifies whether to generate a fused embedding. This parameter is supported only by the qwen3-vl-embedding model. When set to true, all multimodal content in the contents array is fused into a single embedding. The default value is false, which generates an independent embedding for each modality. Fused embeddings support combinations such as text and image, text and video, multiple images and text (by passing multiple image items), and a mix of image, video, and text. This is suitable for retrieval scenarios that require a comprehensive understanding of multimodal content.
### ResponseSuccessful response Error response json { "output": { "embeddings": [ { "index": 0, "embedding": [ -0.026611328125, -0.016571044921875, -0.02227783203125, ... ], "type": "text" }, { "index": 1, "embedding": [ 0.051544189453125, 0.007717132568359375, 0.026611328125, ... ], "type": "image" }, { "index": 2, "embedding": [ -0.0217437744140625, -0.016448974609375, 0.040679931640625, ... ], "type": "video" } ] }, "usage": { "input_tokens": 10, "input_tokens_details": { "image_tokens": 896, "text_tokens": 7 }, "output_tokens": 3, "total_tokens": 906 }, "request_id": "1fff9502-a6c5-9472-9ee1-73930fdd04c5" } Note The usage field varies by model. See the following descriptions: - tongyi-embedding-vision-* series models: Return input_tokens (sum of text and image tokens), input_tokens_details (including image_tokens and text_tokens), output_tokens, and total_tokens. The response example above is for this type of model. - qwen3-vl-embedding: Returns only input_tokens (text tokens only, including system template tokens), image_tokens, and total_tokens (= input_tokens + image_tokens). Does not return input_tokens_details or output_tokens. Example: json { "usage": { "input_tokens": 43, "image_tokens": 1247, "total_tokens": 1290 } } Note - qwen2.5-vl-embedding: Returns only input_tokens and image_tokens. Does not return total_tokens, input_tokens_details, or output_tokens. - multimodal-embedding-v1: Returns input_tokens, image_tokens, image_count, and duration. Does not return total_tokens, input_tokens_details, or output_tokens. json { "code":"InvalidApiKey", "message":"Invalid API-key provided.", "request_id":"fb53c4ec-1c12-4fc4-a580-cdb7c3261fc1" }
outputobject Task output. Properties embeddingsarray A list of the resulting embeddings, where each object corresponds to an input element. Properties indexint The index of the result in the input list. embeddingarray The dimension of the generated array of embeddings depends on the model and the dimension parameter. typestring The input type for this result. text, image, video, and multi_images correspond to text, image, video, and multi-image inputs, respectively. Special types include: fusion is the type returned by the qwen3-vl-embedding model in fused embedding mode; vl is the type returned by the qwen3-vl-embedding model in independent embedding mode.
request_idstring Unique request identifier for tracing and troubleshooting.
codestring Error code. Returned only for failed requests. See Error codes.
messagestring Detailed error message. Returned only for failed requests. See Error codes.
usageobject Statistics about token usage. Properties input_tokensint The number of tokens in the input content for the current request. For the qwen3-vl-embedding and qwen2.5-vl-embedding models, this value includes only text tokens (including system template tokens) and does not include image or video tokens. For the tongyi-embedding-vision-* series models, this value includes the total number of text, image, and video tokens. input_tokens_detailsobject A detailed breakdown of input tokens. This field is returned only by the tongyi-embedding-vision-* series models. It is not returned by the qwen3-vl-embedding, qwen2.5-vl-embedding, or multimodal-embedding-v1 models. Properties image_tokensint The number of tokens for the input images or videos. text_tokensint The number of tokens for the input text. output_tokensint The number of tokens in the output for the current request. This field is returned only by the tongyi-embedding-vision-* series models. total_tokensint The total number of input and output tokens. This field is returned by the qwen3-vl-embedding and tongyi-embedding-vision-* models, but not by the qwen2.5-vl-embedding or multimodal-embedding-v1 models. For the qwen3-vl-embedding model, total_tokens = input_tokens + image_tokens. image_tokensint The number of tokens for the input images or videos in the current request. The system samples frames from input videos, with the maximum number of frames controlled by the system configuration, and then calculates the tokens based on the processed result. This field is returned as a top-level field only by the qwen3-vl-embedding, qwen2.5-vl-embedding, and multimodal-embedding-v1 models. For the tongyi-embedding-vision-* series models, the image token count is included in input_tokens_details.image_tokens. image_countint The number of images in the input for the current request. This field is returned only by the multimodal-embedding-v1 model. durationint The duration of the input video in seconds. This field is returned only by the multimodal-embedding-v1 model.

SDK usage

The SDK's input parameter maps to input.contents in the HTTP request body, but their structures are different.

Code examples

Image embedding

Video embedding

Text embedding

Fused embedding

Multi-image fused embedding

2026-03-06 snapshot version

Image URL

Local image

python
import dashscope
import json
from http import HTTPStatus
# Replace with your image URL.
image = "https://dashscope.oss-cn-beijing.aliyuncs.com/images/256_1.png"
input = [{'image': image}]
# Call the model API.
resp = dashscope.MultiModalEmbedding.call(
    model="tongyi-embedding-vision-plus",
    input=input
)

if resp.status_code == HTTPStatus.OK:
    result = {
        "status_code": resp.status_code,
        "request_id": getattr(resp, "request_id", ""),
        "code": getattr(resp, "code", ""),
        "message": getattr(resp, "message", ""),
        "output": resp.output,
        "usage": resp.usage
    }
    print(json.dumps(result, ensure_ascii=False, indent=4))

To generate an embedding from a local image, convert the image to a Base64 string:

python
import dashscope
import base64
import json
from http import HTTPStatus
# Read the image and convert it to Base64. Replace xxx.png with your image file.
image_path = "xxx.png"
with open(image_path, "rb") as image_file:
    # Read the file and convert it to Base64.
    base64_image = base64.b64encode(image_file.read()).decode('utf-8')
# Set the image format.
image_format = "png"  # Change this to your image's format (e.g., jpg, bmp).
image_data = f"data:image/{image_format};base64,{base64_image}"
# Input data
input = [{'image': image_data}]

# Call the model API.
resp = dashscope.MultiModalEmbedding.call(
    model="tongyi-embedding-vision-plus",
    input=input
)
if resp.status_code == HTTPStatus.OK:
    result = {
        "status_code": resp.status_code,
        "request_id": getattr(resp, "request_id", ""),
        "code": getattr(resp, "code", ""),
        "message": getattr(resp, "message", ""),
        "output": resp.output,
        "usage": resp.usage
    }
    print(json.dumps(result, ensure_ascii=False, indent=4))

Currently, the model only supports video input via URL. Local video files are not supported.

python
import dashscope
import json
from http import HTTPStatus
# Replace with your video URL.
video = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250107/lbcemt/new+video.mp4"
input = [{'video': video}]
# Call the model API.
resp = dashscope.MultiModalEmbedding.call(
    model="tongyi-embedding-vision-plus",
    input=input
)

if resp.status_code == HTTPStatus.OK:
    result = {
        "status_code": resp.status_code,
        "request_id": getattr(resp, "request_id", ""),
        "code": getattr(resp, "code", ""),
        "message": getattr(resp, "message", ""),
        "output": resp.output,
        "usage": resp.usage
    }
    print(json.dumps(result, ensure_ascii=False, indent=4))
python
import dashscope
import json
from http import HTTPStatus

text = "General multimodal representation model example"
input = [{'text': text}]
# Call the model API.
resp = dashscope.MultiModalEmbedding.call(
    model="tongyi-embedding-vision-plus",
    input=input
)

if resp.status_code == HTTPStatus.OK:
    result = {
        "status_code": resp.status_code,
        "request_id": getattr(resp, "request_id", ""),
        "code": getattr(resp, "code", ""),
        "message": getattr(resp, "message", ""),
        "output": resp.output,
        "usage": resp.usage
    }
    print(json.dumps(result, ensure_ascii=False, indent=4))
python
import dashscope
import json
import os
from http import HTTPStatus

# Fuses text, image, and video into a single fused embedding.
# Ideal for use cases like cross-modal retrieval and image search.
text = "This is a test text for generating a multimodal fused embedding."
image = "https://dashscope.oss-cn-beijing.aliyuncs.com/images/256_1.png"
video = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250107/lbcemt/new+video.mp4"

# Input includes text, image, and video. Set enable_fusion=True to generate a fused embedding.
input_data = [\
    {"text": text},\
    {"image": image},\
    {"video": video}\
]

resp = dashscope.MultiModalEmbedding.call(
    # If the environment variable is not set, provide your Model Studio API key, e.g., api_key="sk-xxx".
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    model="qwen3-vl-embedding",
    input=input_data,
    enable_fusion=True,
    # Optional: Specify the embedding dimension. Valid values: 2560, 2048, 1536, 1024, 768, 512, and 256. Default: 2560.
    # parameters={"dimension": 1024}
)

print(json.dumps(resp, ensure_ascii=False, indent=4))

Use qwen3-vl-embedding to fuse multiple images and text into a single embedding. To fuse multiple images, pass multiple image items. This is ideal for semantic retrieval using multi-angle product images and a text description.

python
import dashscope
import json
import os
from http import HTTPStatus

# Fuses multiple product images and a description into a single embedding.
# Ideal for comprehensive semantic retrieval using multi-angle product images and a text description.
text = "White sports shoes, lightweight and breathable, suitable for running and daily wear."
image1 = "https://dashscope.oss-cn-beijing.aliyuncs.com/images/256_1.png"
image2 = "https://img.alicdn.com/imgextra/i3/O1CN01rdstgY1uiZWt8gqSL_!!6000000006071-0-tps-1970-356.jpg"

# Pass multiple image items and set enable_fusion=True to fuse all inputs into a single embedding.
input_data = [\
    {"text": text},\
    {"image": image1},\
    {"image": image2}\
]

resp = dashscope.MultiModalEmbedding.call(
    # If the environment variable is not set, provide your Model Studio API key, e.g., api_key="sk-xxx".
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    model="qwen3-vl-embedding",
    input=input_data,
    enable_fusion=True
)

print(json.dumps(resp, ensure_ascii=False, indent=4))

This example shows how to use the tongyi-embedding-vision-plus-2026-03-06 model and its res_level (resolution) and max_video_frames (video frames) parameters. Built on the Qwen3 foundation, this model supports 30+ languages and generates both independent and fused embeddings.

python
import dashscope
import json
import os
from http import HTTPStatus

# Demonstrates using the res_level (resolution) and max_video_frames (video frames) parameters.
image = "https://dashscope.oss-cn-beijing.aliyuncs.com/images/256_1.png"
video = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250107/lbcemt/new+video.mp4"
text = "This is a visual multimodal representation model."

input_data = [\
    {"text": text},\
    {"image": image},\
    {"video": video}\
]

resp = dashscope.MultiModalEmbedding.call(
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    model="tongyi-embedding-vision-plus-2026-03-06",
    input=input_data,
    dimension=1152,      # Valid values: 1152, 1024, 512, 256, 128, 64
    res_level=1,         # Resolution level: 0, 1, 2, or 3. The default is 1.
    max_video_frames=64  # Maximum number of sampled video frames. Default: 8. Maximum: 64.
)

if resp.status_code == HTTPStatus.OK:
    result = {
        "status_code": resp.status_code,
        "request_id": getattr(resp, "request_id", ""),
        "output": resp.output,
        "usage": resp.usage
    }
    print(json.dumps(result, ensure_ascii=False, indent=4))

To generate a fused embedding with the 2026-03-06 version, place text, image, and video in the same content object. The model fuses all inputs into a single embedding with the type fused.

python
import dashscope
import json
import os
from http import HTTPStatus

# To create a fused embedding, place text and image in the same content object.
# The model fuses all inputs into a single embedding of type `fused`.
text = "White sports shoes, lightweight and breathable, suitable for running and daily wear."
image = "https://dashscope.oss-cn-beijing.aliyuncs.com/images/256_1.png"

input_data = [\
    {"text": text, "image": image}\
]

resp = dashscope.MultiModalEmbedding.call(
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    model="tongyi-embedding-vision-plus-2026-03-06",
    input=input_data,
    dimension=1152
)

if resp.status_code == HTTPStatus.OK:
    result = {
        "status_code": resp.status_code,
        "request_id": getattr(resp, "request_id", ""),
        "output": resp.output,
        "usage": resp.usage
    }
    print(json.dumps(result, ensure_ascii=False, indent=4))

Output example

json
{
    "status_code": 200,
    "request_id": "40532987-ba72-42aa-a178-bb58b52fb7f3",
    "code": "",
    "message": "",
    "output": {
        "embeddings": [\
            {\
                "index": 0,\
                "embedding": [\
                    -0.009490966796875,\
                    -0.024871826171875,\
                    -0.031280517578125,\
                    ...\
                ],\
                "type": "text"\
            }\
        ]
    },
    "usage": {
        "input_tokens": 10,
        "input_tokens_details": {
            "image_tokens": 0,
            "text_tokens": 10
        },
        "output_tokens": 1,
        "total_tokens": 11
    }
}

Error codes

If the model call fails and returns an error message, see Error codes for resolution.

Previous: Synchronous APINext: Rerank

Is this page helpful?

Core capabilities

Embedding types

Model overview

Input formats and usage limits

Model capabilities

Prerequisites

HTTP call

Request

Response

SDK usage

Code examples

Output example

Error codes

Contact Us

Sales Support

Live-chat with our sales team or get in touch with a business development professional in your region.

Contact Sales

Technical Support

Open a ticket and get quick help from our technical team.

Open a Ticket >

Connect & Report Abuse

We look forward to your suggestion.

Post a Suggestion > Report Abuse >

\ \ Hi, I'm Alibaba Cloud AI Assistant!\ \ I can help with questions and solutions.

Why Alibaba Cloud

About Alibaba Cloud

Asia Accelerator

Our Global Network

Global Offices

Trust Center

Case Studies

Analyst Reports

Products & Pricings

Pricing Calculator

ECS

SAS

Model Studio

Database

Security

SMS

Solutions

Financial Services

Retail Services

Media Services

Gaming Services

ISV Solutions

Engage

Developer Community

Partner Network

Startups

Marketplace

Join Alibaba Cloud

Resources & Support

Developer Learning Hub

Documentation Center

Training & Certification

Service Notices

Submit a Ticket

Security Report

Qwen Cloud

Careers About Us Privacy Policy Legal Integrity Compliance Reporting Channel Service Notices Links

© 2009-2026 Copyright by Alibaba Cloud All rights reserved

© 2009-2026 Copyright by Alibaba Cloud All rights reserved

Careers About Us Privacy Policy Legal Integrity Compliance Reporting Channel Service Notices Links