Text + image/audio input
Getting started
Prerequisites
- Get an API key and set it as an environment variable.
- Qwen-Omni supports only OpenAI-compatible calls. Install the SDK. The OpenAI Python SDK requires version 1.52.0+. The Node.js SDK requires version 4.68.0+.
Response
Response
After you run the Running the
Python or Node.js code, the text response is returned and an audio file named audio_assistant.wav is saved in the same directory as your code file.HTTP code returns text and Base64-encoded audio data directly in the audio field.Supported languages
Qwen3.5-Omni supported languages
Qwen3.5-Omni supported languages
Input languages (74 languages): Chinese, English, German, French, Italian, Czech, Indonesian, Thai, Korean, Polish, Japanese, Vietnamese, Finnish, Portuguese, Spanish, Dutch, Russian, Malay, Catalan, Swedish, Turkish, Ukrainian, Romanian, Slovak, Danish, Icelandic, Norwegian (Bokmal), Macedonian, Greek, Hungarian, Galician, Filipino, Croatian, Bosnian, Slovenian, Bulgarian, Kazakh, Belarusian, Latvian, Estonian, Azerbaijani, Uyghur, Swahili, Hindi, Esperanto, Kyrgyz, Tajik, Cebuano, Afrikaans, Arabic, Lithuanian, Javanese, Bengali, Persian, Hebrew, Punjabi, Gujarati, Mongolian, Asturian, Kannada, Marathi, Interlingua, Malayalam, Maltese, Norwegian Nynorsk, Telugu, Urdu, Georgian, Basque, Tamil, Odia, Serbian, MaoriInput dialects (39 dialects): Northeastern Mandarin, Guizhou dialect, Cantonese, Henan dialect, Hong Kong Cantonese, Shanghainese, Shaanxi dialect, Tianjin dialect, Taiwanese Hokkien, Yunnan dialect, Anhui dialect, Fujian dialect, Gansu dialect, Guangdong dialect, Hubei dialect, Hunan dialect, Jiangxi dialect, Shandong dialect, Shanxi dialect, Sichuan dialect, Guangxi dialect, Hainan dialect, Chongqing dialect, Changsha dialect, Hangzhou dialect, Hefei dialect, Yinchuan dialect, Zhengzhou dialect, Shenyang dialect, Wenzhou dialect, Wuhan dialect, Kunming dialect, Taiyuan dialect, Nanchang dialect, Jinan dialect, Lanzhou dialect, Nanjing dialect, Hakka, Southern MinOutput audio languages (29 languages): Chinese, English, German, Italian, Portuguese, Spanish, Japanese, Korean, French, Russian, Thai, Indonesian, Arabic, Vietnamese, Turkish, Finnish, Polish, Hindi, Dutch, Czech, Urdu, Tagalog, Swedish, Danish, Hebrew, Icelandic, Malay, Norwegian, PersianOutput audio dialects (7 dialects): Sichuan dialect, Beijing dialect, Tianjin dialect, Nanjing dialect, Shaanxi dialect, Cantonese, Southern Min
Qwen3-Omni-Flash supported languages
Qwen3-Omni-Flash supported languages
Input/Output languages (11 languages): Chinese, English, German, French, Italian, Thai, Korean, Japanese, Russian, Spanish, PortugueseInput/Output dialects (8 dialects): Sichuan dialect, Shanghainese, Cantonese, Southern Min, Shaanxi dialect, Nanjing dialect, Tianjin dialect, Beijing dialect
Model performance
Audio and video content analysis
| Input | Output |
|---|---|
| Generate a comprehensive, timestamped description of this video. | 00:00.000 - 00:02.500 A rain-soaked city street fills the widescreen frame. Long-exposure photography creates streaks of red and blue car lights on wet pavement. A solitary man in a dark knee-length trench coat and light shirt with a tie walks toward the camera along the right sidewalk.00:12.300 - 00:14.533 The camera tilts down. Inside a flashlight beam, a yellowed, aged single sheet lies in a shallow puddle, edges charred and corners curled. The man kneels, extending gloved fingers toward the document; ripples spread outward as his hand nears.Only partial timestamps are shown. |
Multidialect understanding
| Input | Output |
|---|---|
| Describe the vocal characteristics, emotional state, and full lyrics for singers in different Chinese dialects. | This audio features rap performances by singers from various regions of China. Hangzhou dialect (Wu) -- The male singer's voice is soft and gentle, with the distinctive smoothness and warmth of Wu dialect. His intonation rises and falls gently, and his rhythm is light and quick, creating a relaxed storytelling effect. Emotional state: Relaxed, comfortable, and full of everyday life. He describes Hangzhou's slow-paced lifestyle and urban changes, expressing affection for his hometown.Only partial results are shown. |
Lyric caption generation
| Input | Output |
|---|---|
| Transcribe the song lyrics and provide timestamps for each line. | [00:00:12,680 --> 00:00:16,960] Cat thread sways past moonlight on trees. [00:00:18,400 --> 00:00:22,800] Radiators hum 1998 chart hits. [00:00:24,160 --> 00:00:28,080] Time parts the mist-like heat waves. [00:00:28,920 --> 00:00:33,000] Neon from the screen shines on my nose bridge. ... [00:04:09,000 --> 00:04:10,020] (End)Only partial results are shown. |
Audio-video programming
| Demo 1 | Demo 2 |
|---|---|
Usage
Streaming output
All requests to Qwen-Omni must set stream=True.
Model configuration
Configure parameters, prompts, and audio-video lengths based on your use case to balance cost, speed, and quality.
- Audio-video understanding
- Audio understanding
| Use case | Recommended video length | Recommended prompt | Recommended max_pixels value |
|---|---|---|---|
| Fast review, low cost | ≤60 minutes | Simple prompt within 50 words | 230,400 |
| Content extraction (long video segmentation) | ≤60 minutes | Simple prompt within 50 words | 921,600 to 2,073,600 |
| Standard analysis (short video tagging) | ≤4 minutes | Use the structured prompt below | 921,600 to 2,073,600 |
| Fine-grained analysis (multiple speakers/complex scenes) | ≤2 minutes | Use the structured prompt below | 2,073,600 |
Recommended structured prompt for audio-video understanding
Recommended structured prompt for audio-video understanding
For fine-grained descriptions of long videos, segment them first.
Thinking mode
For enable/disable, streaming output, and
thinking_budget, see Thinking.enable_thinking defaults to false). Qwen-Omni-Turbo does not support thinking.
In thinking mode, set modalities: ["text"] — audio output is not supported when thinking is enabled.
Web search
The Qwen3.5-Omni series supports web search to retrieve real-time information and perform reasoning. Enable web search using the enable_search parameter and set search_strategy to agent.
- Web search is supported only in the Qwen3.5-Omni series. The
search_strategyparameter only acceptsagent. - See Pricing for billing information related to the
agentstrategy.
Multimodal input
Video and text input
You can input video as an image list or as a video file. If you input a video file, the model can also understand the audio in the video.
The following sample code uses a video URL from the internet as an example. To input a local video, see Input Base64-encoded local files. Streaming output is required for all calls.
Video file format (can understand audio in the video)
- Number of files:
- Qwen3.5-Omni series: Up to 512 files using public URLs; up to 250 files using Base64 encoding.
- Qwen3-Omni-Flash and Qwen-Omni-Turbo series: Only one file allowed.
- File size:
- Qwen3.5-Omni: Up to 2 GB, up to 1 hour duration.
- Qwen3-Omni-Flash: Up to 256 MB, up to 150 seconds duration.
- Qwen-Omni-Turbo: Up to 150 MB, up to 40 seconds duration.
- File formats: MP4, AVI, MKV, MOV, FLV, WMV, etc.
- Visual and audio information in video files are billed separately.
Image list format
Number of images
- Qwen3.5-Omni: Minimum 2 images, maximum 2048 images.
- Qwen3-Omni-Flash: Minimum 2 images, maximum 128 images.
- Qwen-Omni-Turbo: Minimum 4 images, maximum 80 images.
Audio and text input
- Number of files:
- Qwen3.5-Omni series: Up to 2048 files using public URLs; up to 250 files using Base64 encoding.
- Qwen3-Omni-Flash and Qwen-Omni-Turbo series: Only one file allowed.
- File size:
- Qwen3.5-Omni: Up to 2 GB, up to 3 hours duration.
- Qwen3-Omni-Flash: Up to 100 MB, up to 20 minutes duration.
- Qwen-Omni-Turbo: Up to 10 MB, up to 3 minutes duration.
- File formats: Supports major formats such as AMR, WAV, 3GP, 3GPP, AAC, and MP3.
Image and text input
Qwen-Omni models support multiple image inputs. The requirements for input images are as follows:
-
Number of images:
- When passed as a public URL: up to 2048 images per request.
- When passed as Base64-encoded strings: up to 250 images per request.
-
Image size:
- Qwen3.5 series: Each image file must be 20 MB or less.
- Qwen3-Omni-Flash and Qwen-Omni-Turbo series: Each image file must be 10 MB or less.
- The width and height of the image must both be greater than 10 pixels. The aspect ratio must not exceed 200:1 or 1:200.
- For supported image types, see Visual and video understanding.
Multi-turn conversation
When you use the multi-turn conversation feature of Qwen-Omni models, note the following:
- Assistant message: Assistant messages in the messages array support only text data.
- User message: A user message can contain text and data from only one other modality. In a multi-turn conversation, you can use different modalities in separate user messages.
Parse Base64-encoded audio data output
The audio output from Qwen-Omni models is Base64-encoded data delivered in a stream. You can use a string variable to accumulate the Base64 data from each fragment as it arrives. After the stream is complete, decode the final string to create the audio file. Alternatively, decode and play each fragment in real time as it is received.
Input Base64-encoded local files
- Images
- Audio
- Video file
- Image list (as video)
This example uses the locally saved file eagle.png.
API reference
For the input and output parameters of Qwen-Omni, see Chat completions API.
Billing and rate limits
Billing rules
Qwen-Omni is billed based on the number of tokens for different modalities, such as audio, image, and video. See Pricing for pricing details.
Rules for converting audio, images, and videos to tokens
Rules for converting audio, images, and videos to tokens
AudioVideoVideo files generate two types of tokens:
- Qwen3.5-Omni series: Input audio total tokens = Audio duration (in seconds) x 7; Output audio total tokens = Audio duration (in seconds) x 12.5
- Qwen3-Omni-Flash: Total tokens for both input and output audio = Audio duration (in seconds) x 12.5
- Qwen-Omni-Turbo: Total tokens for both input and output audio = Audio duration (in seconds) x 25
Qwen3.5-Omni seriesandQwen3-Omni-Flash: 1 token per32 x 32pixels.Qwen-Omni-Turbo: 1 token per28 x 28pixels.
vl_high_resolution_images parameter to increase the resolution limit to 16384 tokens (not supported by Qwen-Omni-Turbo or Qwen3-Omni-Flash). Use the following code to estimate the total tokens for an image:video_tokens (visual) and audio_tokens (audio).video_tokens
audio_tokens- Qwen3.5-Omni series: Input audio total tokens = Audio duration (in seconds) x 7; Output audio total tokens = Audio duration (in seconds) x 12.5
- Qwen3-Omni-Flash: Total tokens for both input and output audio = Audio duration (in seconds) x 12.5
- Qwen-Omni-Turbo: Total tokens for both input and output audio = Audio duration (in seconds) x 25
- If the audio duration is less than 1 second, it is calculated as 1 second.
FAQ
How do I assign a role to Qwen-Omni-Turbo?
When the output modalities include audio, Qwen-Omni-Turbo doesn't support a System Message. Even if you set role information such as "You are XXX", the model still identifies itself as Qwen.
- Option 1 (recommended): Qwen3-Omni-Flash and later series support System Message. Switch to one of these series.
- Option 2: Prepend a User Message and an Assistant Message that establish the role to the
messagesarray.
Sample code for role assignment
Sample code for role assignment
Error codes
If a call fails, see Error messages.
Voice list
For the voices each omni-modal model supports, including samples and voice parameter values, see Omni-modal voice list.