Multimodal Models
Qwen models that combine text, image, and audio in a single request.
Multimodal Models
Several Qwen models accept mixed inputs — text, images, and audio — in a single API call. This page covers when to use multimodal models versus specialized ones, and how to structure multi-modal requests.
Multimodal-Capable Models
Qwen3.5-Plus: Text + Image + Video
qwen3.5-plus is the most versatile model for mixed text and visual inputs. It handles images and video frames alongside text at a 1M token context window.
``python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_QWENAPI_KEY",
base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
)
Image + text
response = client.chat.completions.create(
model="qwen3.5-plus",
messages=[
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": "https://example.com/diagram.png"}},
{"type": "text", "text": "Explain this architecture diagram."},
],
}
],
)
`
Video Input
Pass video as a URL or base64-encoded file. The model samples frames automatically:
`python
response = client.chat.completions.create(
model="qwen3.5-plus",
messages=[
{
"role": "user",
"content": [
{"type": "video_url", "video_url": {"url": "https://example.com/demo.mp4"}},
{"type": "text", "text": "Summarize what happens in this video."},
],
}
],
)
`
Qwen3-Omni: Text + Image + Audio
qwen3-omni-flash is the only model that handles audio input and output alongside text and images. Use it when your pipeline involves voice or sound.
`python
import base64
with open("audio.wav", "rb") as f:
audio_b64 = base64.b64encode(f.read()).decode()
with open("screenshot.png", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode()
response = client.chat.completions.create(
model="qwen3-omni-flash",
messages=[
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_b64}"}},
{"type": "input_audio", "input_audio": {"data": audio_b64, "format": "wav"}},
{"type": "text", "text": "The user is describing what they see in this image. Does their description match?"},
],
}
],
)
`
Choosing the Right Model
Prefer specialized models when you only need one modality. qwen-vl-max outperforms qwen3.5-plus on pure vision tasks. qwen-audio-turbo is cheaper for pure transcription than qwen3-omni-flash.
Use multimodal models when your inputs genuinely mix modalities in a single reasoning step — not just because they support multiple types.
Token Counting
Each modality contributes to the input token count:
- Text: standard token count
- Images: ~1,000–1,500 tokens per image (varies by resolution)
- Video: tokens per sampled frame, similar to images
- Audio (Omni): ~1,500 tokens per minute of audio
The 1M context window on
qwen3.5-plus` makes it practical to include multiple images or a long video alongside a large text prompt.