Use Qwen-Omni through the HTTP API to understand text, images, audio, and video for tasks such as audio and video analysis, content tagging, and meeting summaries. 'Non-realtime' refers to HTTP request-based calls, not deferred processing.
Getting started
Choose an example by output type: Qwen3.8-Omni-Flash for text analysis, or Qwen3.5-Omni for speech generation.
Both output examples require DASHSCOPE_BASE_URL. Set it to the base_url in the Chat Completions endpoint for your workspace, and use an API key from the corresponding region. The example below uses the Singapore endpoint; for another region, replace ap-southeast-1. See Regions.
- Text output (Qwen3.8-Omni-Flash)
- Audio output (Qwen3.5-Omni)
PrerequisitesSet
- Obtain an API key and set the API key as an environment variable.
- The examples below use OpenAI-compatible invocation. You must install the latest SDK. The minimum required versions are 1.52.0 for the OpenAI Python SDK and 4.68.0 for the Node.js SDK.
Install the dependencies before you run the code:
pip install openai (Python) or npm install openai (Node.js).AUDIO_URL to an accessible WAV audio URL. The commands below install the Python dependency and set the audio URL. Configure the service URL using the shared steps above, and configure DASHSCOPE_API_KEY using the links in the prerequisites.Return result
Return result
After you run the When you run the
Python or Node.js code, the console prints the thinking process, then the model reply, and finally the usage. Qwen3.8-Omni-Flash has thinking enabled by default; the response contains a reasoning_content field, and the thinking part is billed as part of usage.completion_tokens_details.reasoning_tokens.HTTP code, the thinking process and reply are returned as streamed chunks, followed by a final usage chunk (the usage field contains reasoning_tokens).Model selection
For audio/video understanding, meeting minutes, subtitle generation, and text Q&A, prefer Qwen3.8-Omni-Flash, which supports deep thinking, tool calling, and web search: see Getting started for call examples, Thinking mode for thinking, Web search for search, and Function calling for tools. When you need spoken replies, you can use Qwen3.5-Omni below.
Qwen3.8-Omni-Flash
Supported regions: Singapore, China North 2 (Beijing), Germany (Frankfurt), China (Hong Kong), Japan (Tokyo), and US (Virginia). Use an API key from the selected region.
qwen3.8-omni-flash is designed for audio and video understanding, meeting summaries, and content analysis.
| Model | Input | Output | APIs |
|---|---|---|---|
qwen3.8-omni-flash | Text, images, audio, video | Text | Chat Completions, Responses |
- The context length is 1M tokens.
- Audio input supports 113 languages and dialects, the same as Qwen3.5-Omni. See the input audio language list below.
- Supports Function Calling and web search.
Qwen3.5-Omni
Supported regions: Singapore and China North 2 (Beijing). Use an API key from the selected region.
- Input limits: Up to 3 hours of audio or 1 hour of video
- Audio control: Supports adjusting volume, speaking rate, and emotion through instructions
- Visual capability: Matches the level of Qwen3.5. Understands images, speech, sound effects, and other multimodal input
- Combined multimodal input: Supports any combination of text with images, audio, and video in a single request
- Voice cloning:
qwen3.5-omni-plusandqwen3.5-omni-flashsupport custom voices. Snapshot versions are not supported. See Voice cloning.
Qwen3-Omni-Flash
Supported regions: Singapore and China North 2 (Beijing). Use an API key from the selected region.
- Input limits: 20 minutes of audio or 150 seconds of video
- Thinking mode: Use
enable_thinkingto enable or disable thinking - Input modality: Supports only a combination of text with a single other modality (image, audio, or video).
Model capability comparison
| Series | Audio/video understanding | Deep thinking | Web search | Input audio languages | Output audio languages | Supported voices |
|---|---|---|---|---|---|---|
| Qwen3.8-Omni-Flash Text output only | Supported | Supported | Supported | 113 languages and dialects. See the full input audio language list. | Not supported | Not applicable |
| Qwen3.5-Omni Omni-modal model with audio output | Supported | Not supported | Supported | 113 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 (Bokmål), 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, Maori 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 Min | 36 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, Persian Dialects: Sichuan dialect, Beijing dialect, Tianjin dialect, Nanjing dialect, Shaanxi dialect, Cantonese, Southern Min | 55 |
| Qwen3-Omni-Flash Hybrid thinking model | Supported | Supported | Not supported | 19 Language: Chinese, English, German, French, Italian, Thai, Korean, Japanese, Russian, Spanish, Portuguese Dialects: Sichuan dialect, Shanghainese, Cantonese, Southern Min, Shaanxi dialect, Nanjing dialect, Tianjin dialect, Beijing dialect | 19 Language: Chinese, English, German, French, Italian, Thai, Korean, Japanese, Russian, Spanish, Portuguese Dialects: Sichuan dialect, Shanghainese, Cantonese, Southern Min, Shaanxi dialect, Nanjing dialect, Tianjin dialect, Beijing dialect | 17 to 49 > Varies by version |
For model names, context windows, pricing, and snapshot versions, check in the QwenCloud console. For rate limits, see Rate limiting.
Media file input
Supported input modalities
The following sections cover image, audio, video, and combined media input. The first three complete examples each pass text with one media type and use Qwen3.8-Omni-Flash to return text through Chat Completions. Combined media input is supported by Qwen3.8-Omni-Flash and Qwen3.5-Omni; see the corresponding example below.
Image input
This example uses a public image URL. To use a local file, see Local files (Base64).
Input limits
Input limits
The models on this page support multiple images per request. Image requirements:
-
Number of images:
- Qwen3.8-Omni-Flash and Qwen3.5-Omni series: Up to 2048 images by public URL, up to 250 images by Base64 encoding
- Qwen3-Omni-Flash: 2 to 128 images for image-list video input
-
Image size:
-
Using public URLs:
- Qwen3.8-Omni-Flash and Qwen3.5-Omni series: Each image file must not exceed 20 MB
- Qwen3-Omni-Flash series: Each image file must not exceed 10 MB
- Qwen3.5-Omni and Qwen3-Omni-Flash using Base64 encoding: The encoded Base64 string must be smaller than 10 MB.
-
Using public URLs:
- Both width and height must exceed 10 pixels. The aspect ratio must not exceed 200:1 or 1:200.
- Supported image types: See Image and video understanding.
Audio input
This example uses a public audio URL. To use a local file, see Send local files with Base64 encoding.
Input limits
Input limits
-
Number of files:
- Qwen3.8-Omni-Flash and Qwen3.5-Omni series: Up to 2048 files using public URLs and up to 250 files using Base64 encoding.
- Qwen3-Omni-Flash series: Only one file is allowed.
-
File size:
-
Using public URLs:
- Qwen3.8-Omni-Flash and Qwen3.5-Omni series: Up to 2 GB
- Qwen3-Omni-Flash: Up to 100 MB
- Using Base64 encoding: The encoded Base64 string must be smaller than 10 MB
-
Using public URLs:
-
Duration limits:
- Qwen3.8-Omni-Flash and Qwen3.5-Omni series: Up to 3 hours
- Qwen3-Omni-Flash: Up to 20 minutes
- File formats: common formats such as AMR, WAV, 3GP, 3GPP, AAC, and MP3.
Multichannel audio
qwen3.8-omni-flash supports two-channel stereo and four-channel FOA spatial audio (WYZX channel order). These inputs retain spatial information for audio understanding.
use_multichannel defaults to false, which parses all audio as mono. When it is true and the input has two channels (left and right) or four channels (FOA, in WYZX order), the model parses spatial audio information.
In the Chat Completions quick-start example, set AUDIO_URL to the corresponding multichannel WAV audio and add the following argument to client.chat.completions.create(). In an HTTP request, use_multichannel is a top-level request body field. For where to pass it in a Responses call, see Responses: audio and video input.
qwen3.8-omni-flash for spatial audio understanding. For four-channel FOA audio, the call is identical—just set AUDIO_URL to a four-channel WAV in WYZX channel order.
The multichannel audio must have either 2 channels (two-channel stereo, left and right) or 4 channels (four-channel FOA, WYZX channel order). You can check the channel count with
soundfile:Video input
Provide the video as a video file (with audio support) or an image list. See the tabs below.
- Video file (supports audio in the video)
- Image list format
Input limits
Input limits
-
Number of files:
- Qwen3.8-Omni-Flash: Up to 64 files.
- Qwen3.5-Omni series: Up to 512 files using public URLs and up to 250 files using Base64 encoding.
- Qwen3-Omni-Flash series: Only one file is allowed.
-
File size:
-
Using public URLs:
- Qwen3.8-Omni-Flash and Qwen3.5-Omni series: Up to 2 GB
- Qwen3-Omni-Flash: Up to 256 MB
- Using Base64 encoding: The encoded Base64 string must be smaller than 10 MB
-
Using public URLs:
-
Duration limits:
- Qwen3.8-Omni-Flash: 2 hours
- Qwen3.5-Omni series: 1 hour
- Qwen3-Omni-Flash: 150 seconds
- File formats: MP4, AVI, MKV, MOV, FLV, WMV, and others.
- Visual and audio information in the video file are billed separately.
Troubleshoot video decoding errors
Troubleshoot video decoding errors
If a request reports a video decoding error, such as
Invalid data found when processing input, check the file locally, then re-encode it. The following commands require FFmpeg with the libx264 encoder.-
Check whether the entire file can be decoded.
-xerrorstops on an error, and-f null -discards the output without creating a file. If the command finishes normally without errors, the file passes this decoding check. -
Re-encode the video as H.264 and the audio as AAC. Write the result to a new file to keep the original.
-
Check the new file again. Once it passes the check and its duration, picture, and sound are correct, upload it again and retry the model request.
Combined media input
Qwen3.8-Omni-Flash and Qwen3.5-Omni support combining text, images, audio, and video in the same request. The examples below use Qwen3.8-Omni-Flash to analyze an image and audio and generate a text response. To generate speech, use Qwen3.5-Omni. See the audio output example.
Media file input methods
Use these snippets to replace the media items in the complete Chat Completions examples above. Responses uses a different field structure; see Use the Responses API.
- Public URL
- Local files (Base64)
The complete examples use public URLs. The files must be accessible through their URLs. See the input restrictions for each modality above for supported formats, counts, sizes, and durations. The following Chat Completions media items use the same replacement locations as the local Base64 snippets.The items below represent an image, audio, a video file, and a video image list, respectively. Select the item for your input type; do not use the entire array as the request body.
Audio output
Choose a voice
qwen3.5-omni-plus, qwen3.5-omni-flash, and qwen3-omni-flash support audio output. For their available voices, see Voice list.
Save and play audio in real time
qwen3.5-omni-plus, qwen3.5-omni-flash, and qwen3-omni-flash (non-thinking mode) output audio as streaming Base64-encoded data. During generation, maintain a string variable and append the Base64-encoded data from each returned chunk. After generation completes, Base64-decode the complete string to get the audio file. Alternatively, decode and play each chunk in real time.
Qwen3.5-Omni and Qwen3-Omni-Flash support streaming output only. The examples in this section require
stream=True; otherwise the request fails.Advanced usage
Thinking mode
Qwen3.8-Omni-Flash
Thinking is enabled by default for qwen3.8-omni-flash, with reasoning_effort defaulting to xhigh. The top-level Chat Completions request field reasoning_effort accepts none, minimal, low, medium, high, xhigh, and max. Do not set reasoning_effort and thinking_budget together: the request returns an error.
Choose low, medium, or xhigh for the thinking effort. For compatibility, minimal maps to low, high and max map to xhigh, and none disables thinking.
Add the following argument to client.chat.completions.create() in the Chat Completions quick-start example. Pass reasoning_effort directly as an SDK argument.
Qwen3-Omni-Flash
This section describes hybrid thinking for Qwen3-Omni-Flash. You can use the enable_thinking parameter to enable or disable the thinking mode:
true: enables thinking modefalse(default): disables thinking mode
In thinking mode, audio output is not supported.
Qwen3.5-Omni and Qwen3-Omni-Flash support streaming output only. The examples in this section require
stream=True; otherwise the request fails.Response
Response
Web search
Qwen3.8-Omni-Flash supports web search to retrieve current information and generate text answers.
Qwen3.8-Omni-Flash uses the web_search tool through Responses. Qwen3.8-Omni-Flash and Qwen3.5-Omni use the agent search strategy through Chat Completions. For fees, see Web search billing.
The following Chat Completions examples use Qwen3.8-Omni-Flash with enable_search=True and search_options={"search_strategy": "agent"} to enable web search and reasoning_effort="none" to disable thinking, then read streamed text responses.
Multi-turn conversation
Pass User Message and Assistant Message entries in conversation order in the messages array. The following example uses Qwen3.8-Omni-Flash to return a text response.
For Qwen3.8-Omni-Flash multi-turn conversations, preserve_thinking is enabled by default. Put the previous answer and reasoning in the historical assistant message's content and reasoning_content fields, respectively, and include that message in messages for the next request. When supplied and enabled, historical reasoning counts toward input tokens and billing. For how to pass this parameter and a complete multi-turn example, see Pass the thinking process.
The following multi-turn example uses Qwen3.8-Omni-Flash with reasoning_effort="none" to disable thinking. It passes text responses in historical assistant messages and text plus one modality in each user message. For combined input, see Combined media input:
-
Assistant Message
The
contentof an assistant message in themessagesarray can contain only text data; reasoning is passed in thereasoning_contentfield. - User Message In this example, each user message contains text and one other modality. In multi-turn conversations, you can input different modalities in different user messages.
Structured output
In voice customer support, transcribing with ASR and then identifying intent with a text model requires waiting for two model calls in sequence. Text alone also makes it difficult to recognize emotion conveyed by vocal delivery. Omni analyzes audio directly and returns the transcript, intent, and emotion in one call for downstream handling.
This example uses JSON Mode with qwen3.8-omni-flash and disables thinking. The prompt defines three fields: asr for the transcript, intent for intent, and emotion for emotion.
Qwen3.8-Omni-Flash does not support JSON Schema mode. JSON Mode guarantees JSON syntax only; define field constraints in the prompt and validate them on the client. See Structured output for supported models and limitations.
DASHSCOPE_API_KEY and DASHSCOPE_BASE_URL from the quickstart, install the dependencies, and set the file path:
intent and emotion to select business flows and response styles.
Real-time scenarios: segment audio with local VAD
Real-time scenarios: segment audio with local VAD
For real-time scenarios, use a local VAD model (such as FSMN-VAD) to segment speech. When a speech endpoint is detected, package the audio segment as WAV and send it to Omni to obtain the transcript, intent, and emotion.
Use the Responses API
Multi-turn audio and video conversations with Chat Completions require the conversation history in each request. If historical messages contain Base64 media data, that data is retransmitted, increasing the request size and upload bandwidth usage.
Qwen3.8-Omni-Flash supports the Responses API. Use previous_response_id to link historical context so that subsequent requests need only a new question and the previous response ID. You can also configure the web_search tool to let the model combine media content with web search results for analysis.
Basic usage
Install the latest OpenAI Python SDK, then reuse the API key, DASHSCOPE_BASE_URL, and AUDIO_URL from the quick-start example. Responses uses input, with the audio URL in audio_url, rather than the Chat Completions input_audio.data structure. Audio and video input is allowed only in user messages.
VIDEO_URL to an accessible video URL and replace input[0].content in the preceding Responses example with:
"use_multichannel": True (Python) to the audio content object above, alongside audio_url and format. The default is False, which processes audio as single-channel audio.
For a local WAV file, replace the audio_input definition in the basic example with the following code and keep the rest of the call unchanged. data must contain a complete Data URI and cannot be used together with audio_url. For video input, use the URL example above.
Advanced usage
- Multi-turn conversations
- Web search
After running the basic example, append the following code to the same Python program. Use Use the default
response.id to link context. Subsequent requests need only a new question and the previous response ID.store=True to store responses. Response IDs are valid for 7 days. See Multi-turn conversations.Optimize results
Audio and video analysis configuration recommendations
The following configuration recommendations apply to Qwen3.5-Omni. Adjust parameters, prompts, and media lengths for your use case. For Qwen3.8-Omni-Flash, see Recommended prompts.
- Audio-video understanding
- Audio understanding
| Use case | Recommended video length | Recommended prompt | Recommended max_pixels |
| Fast review, low cost | ≤60 minutes | Simple prompt within 50 words | 230,400 |
| Content extraction (long video segmentation) | ≤60 minutes | 921,600~2,073,600 | |
| Standard analysis (short video tagging) | ≤4 minutes | Use the structured prompt belowRecommended prompt | 921,600~2,073,600 |
| Fine-grained analysis (multiple speakers/complex scenes) | ≤2 minutes | 2,073,600 |
You can segment long videos first to obtain fine-grained descriptions.
Recommended prompts
These prompts apply to qwen3.8-omni-flash. Choose a prompt for your task and place it in the text field of a type="text" item in the user message's content array. Include the audio or video to analyze in the same message. Output format instructions in the prompts guide the generated content.
Detailed audiovisual description: chronological narrative
Detailed audiovisual description: chronological narrative
Combine visual and audio information in a chronological account with time ranges for locating events in the video.
Detailed audiovisual description: separate transcripts and on-screen text
Detailed audiovisual description: separate transcripts and on-screen text
Return separate sections for events, on-screen text, and speech transcripts. Preserve the original wording, speakers, and time ranges for search and verification.
Structured audiovisual description
Structured audiovisual description
Return JSON organized into scenes and events. Include both the task instructions and the complete JSON Schema in the prompt to define fields, types, required properties, and constraints.
Highly dynamic audiovisual content
Highly dynamic audiovisual content
Describe rapidly changing visuals, actions, and events. Adjust the video sampling frame rate to the dynamics of the content. The model maintains stable results with input sampled at up to 15 fps, capturing finer actions and temporal changes. Higher frame rates increase processing costs, so choose a rate that suits the task.
Audiovisual analysis with multiple speakers
Audiovisual analysis with multiple speakers
Use audio and video to identify speakers and produce a timestamped transcript. When video is provided, the model can use visual information to analyze the correspondence between speakers and speech.
Audio event localization
Audio event localization
Locate a specified sound event. Replace
[audio event label] in the prompt with the target event, such as dog_barking. The result contains the event type and start and end times in seconds.Model performance
Audio and video content analysis
Generate a comprehensive timestamped description of this video. | 00:00.000 – 00:02.500A 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. Raindrops cling to his shoulders and hair. Each step makes a muffled plop on damp concrete. A low, ominous electronic hum underscores ambient sounds, while steady rain crackles all around. Colorful graffiti covers the brick wall beside him, and neon signs glow in the distance—one clearly displays orange-red cursive script reading "Nice," while another vertical sign shows the letters "AT" at its bottom.......00:12.300 – 00:14.533The camera tilts down. Inside a flashlight beam, a yellowed, aged single sheet lies in a shallow puddle, its edges charred and corners curled. Inked paragraphs cover most of its surface, but moisture and scorch marks make the text unreadable. The man kneels, extending gloved fingers toward the document. Ripples spread outward as his hand nears. Sirens peak then begin to fade slightly, while the ambient hum remains steady. The scene freezes just before the trembling paper is touched, ending the clip.Only partial timestamps are shown. |
Multidialect understanding
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, showcasing rich dialect diversity. The following are detailed descriptions of each singer's vocal traits, emotional state, and corresponding lyrics:Hangzhou dialect (Wu)Vocal traits:The male singer's voice is soft and gentle, with the distinctive smoothness and warmth of the 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 and reflections on modern development. Overall, he feels cozy and familiar.Lyrics:> Hangzhou dialect, listen up! Our culture includes local erhua pronunciation.> Like flowers blooming by West Lake, no cultural survey needed—we understand it best.> None of you understand. 'San bu da men', 'ge'r', 'lao'r', 'fen'r', 'ya'r'... how is an outsider supposed to tell any of these apart?> Let's go! Transport is fast—subways everywhere. We'll check it out.> Welcoming Southeast Asia and Thailand, watching "Thirteen Ta" shows. Proud of our city, direct in personality.> So you only came for the "bridge-crossing" experience, and because the flavor is different, you're not returning?Only partial results are shown. |
Lyric caption generation
Transcribe the song lyrics and provide timestamps for each line in this format:[00:00:15,020 --> 00:00:28,085] : When you walk through a storm, hold your head up high.[00:00:28,085 --> 00:00:40,200] And don't be afraid of the dark. ...... | [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:03:16,720 --> 00:03:21,680] We nestle in the softest ring of the tree trunk.[00:03:22,400 --> 00:03:27,000] Breathing turns residual warmth into honey-sugar.[00:03:28,160 --> 00:03:33,200] The sofa sinks into cloud-fluff shape.[00:03:34,000 --> 00:03:38,800] Every pore soaks in sunshine.[00:04:09,000 --> 00:04:10,020] (End)Only partial results are shown. |
Audio-video programming
API reference
- Chat Completions: Input and output parameters for the models on this page.
- Responses: Input and output parameters for Qwen3.8-Omni-Flash.
Billing and rate limits
Qwen3.8-Omni-Flash supports automatic implicit caching.
Billing rules
The models on this page are billed by the number of tokens for each modality (audio, image, video). For per-region pricing, see Model pricing.
Token conversion rules for audio, images, and videos
Token conversion rules for audio, images, and videos
Token conversion rules and applicable models are listed by modality below.
- Audio
- Images
- Video
-
Qwen3.8-Omni-Flash: Input audio formula:Total tokens = Audio duration (seconds) * 7. -
Qwen3.5-Omni series:- Input audio formula:
Total tokens = Audio duration (seconds) * 7 - Output audio formula:
Total tokens = Audio duration (seconds) * 12.5
- Input audio formula:
-
Qwen3-Omni-Flash: For both input and output audio,Total tokens = Audio duration (seconds) * 12.5