Client events for the Qwen-Omni-Realtime API.
This page is the event reference for Qwen-Omni-Realtime. Event definitions are based on WebSocket access. AOQ and WebRTC use their respective data channels to send and receive model events, and media tracks to transmit media. First read WebSocket access, WebRTC access, or AOQ access.
session.update
After opening the WebSocket connection, you can send session.update to configure the session. If you need to change the configuration later, send only the settings you want to change; the other settings will stay as they are.
The server validates the parameters you send. If validation succeeds, it returns the complete updated session configuration in session.updated. If validation fails, it returns an error event.
typestring(required)session.update.sessionobject(optional)session is required when updating a session. The total input token limit is 196608, calculated using the same rules as Qwen3.5-Omni-Realtime.Properties
Properties
modalitiesarray(optional)- ["text"] Text only.
- ["text","audio"] (default) Text and audio.
voicestring(optional)- Qwen3.8-Omni-Flash-Realtime:
Tina - Qwen3.5-Omni-Realtime series model:
Tina - qwen3-omni-flash-realtime-2025-09-15:
Cherry
audioobject(optional)Properties
Properties
inputobject(optional)Properties
Properties
formatobject(optional)Properties
Properties
typestring(optional)qwen3.5-omni-plus-realtime and qwen3.5-omni-flash-realtime: pcm (default, mono 16-bit raw PCM) or wav (mono 16-bit PCM in a WAV container). Multichannel input for Qwen3.8-Omni-Flash-Realtime requires pcm, which is the default.sample_rateinteger(optional)qwen3.5-omni-plus-realtime and qwen3.5-omni-flash-realtime: 8000, 16000 (default), 24000, or 48000 Hz. Multichannel input for Qwen3.8-Omni-Flash-Realtime requires 16000 Hz, which is the default.The following four fields apply to Qwen3.8-Omni-Flash-Realtime multichannel input over WebSocket:sample_formatstring(optional)s16le is supported; default: s16le.channelsinteger(optional)1 (default), 2, or 4. Two-channel and four-channel spatial audio use twice the input tokens of ordinary audio. See Token calculation.packingstring(optional)interleaved is supported; default: interleaved.channel_layoutstring(optional)channels: mono for one channel, raw_mic_array for two, and foa_ambix for four. An explicit value must match channels.Multichannel input requires PCM, 16000 Hz, s16le, and interleaved samples. Omitted fields use their defaults; supplied fields must have valid types and values. Do not send null instead of omitting a field.outputobject(optional)Properties
Properties
formatobject(optional)Properties
Properties
typestring(optional)qwen3.5-omni-plus-realtime and qwen3.5-omni-flash-realtime: pcm (default, mono 16-bit raw PCM) or wav (mono 16-bit PCM in a WAV container).sample_rateinteger(optional)qwen3.5-omni-plus-realtime and qwen3.5-omni-flash-realtime: 8000, 16000, 24000 (default), or 48000 Hz.voicestring(optional)Tina. See the voice list for available voices and their voice values. session.voice remains available for existing integrations. For new integrations, use session.audio.output.voice. If both fields are set, the audio output uses the voice specified by session.audio.output.voice.input_audio_transcriptionobject | null(optional)null to disable it.Properties
Properties
modelstring(required)qwen3-asr-flash-realtime. Set {"model":"qwen3-asr-flash-realtime"} to enable transcription; the model value cannot be changed. The Python SDK's enable_input_audio_transcription is an update_session method argument, not a top-level session.update field.input_audio_formatstring(optional)pcm. The input audio must be a PCM audio stream at a 16 kHz sample rate.output_audio_formatstring(optional)pcm. The output audio is a PCM audio stream at a 24 kHz sample rate.smooth_outputboolean | null(optional)qwen3-omni-flash-realtime-2025-09-15.Whether to enable a colloquial response style. Valid values:-
true(default): Colloquial responses. -
false: Formal, written responses.Content that is difficult to read aloud may not perform well.
-
null: The model automatically selects between colloquial and formal style.
instructionsstring(optional)instructions value fully replaces the previous instructions value instead of appending to it. To keep the role, send the existing role instructions together with the new requirements.turn_detectionobject(optional)null to disable VAD and trigger model responses manually from the client.Properties
Properties
typestring(optional)server_vad(default): Detects end of speech based on acoustic features.semantic_vad: Detects end of speech based on semantic validity, filtering out backchannels and background noise. Supported by Qwen3.8-Omni-Flash-Realtime and the Qwen3.5-Omni-Realtime series.semantic_vad_ec: Semantic validity detection for customer service and business scenarios. Compared withsemantic_vad, this mode detects user speech more readily to interrupt the model response, while still filtering out meaningless sounds such as background noise. Supported by the Qwen3.8-Omni-Flash-Realtime series.
thresholdfloat(optional)[-1.0, 1.0]. Default: 0.5.silence_duration_msinteger(optional)idle_timeout_msinteger(optional)qwen3.5-omni-plus-realtime and qwen3.5-omni-flash-realtime models in server_vad mode.The idle timeout in milliseconds. After the server finishes audio playback and the user remains silent beyond this duration (no speech.started triggered), the model proactively generates a response to prompt the user to continue the conversation based on the current context. The timeout starts after the last model response audio finishes playing.Valid range: [5000, 30000].enable_searchboolean(optional)false. When enabled, the model decides autonomously whether to search to answer real-time questions.tools and enable_search are incompatible. Do not enable both at the same time.
search_optionsobject(optional)enable_search is enabled.Properties
Properties
enable_sourceboolean(optional)true to enable.videoobject(optional)Properties
Properties
inputobject(optional)Properties
Properties
representation_compactstring(optional)none, which preserves full fine-grained input. normal aggregates it to reduce computation when fine visual detail is unnecessary; for the same video input, it uses one quarter of the tokens used by none. See Token calculation. Set this before the first audio segment; it cannot change after audio input starts.toolsarray(optional)type; tools and enable_search cannot both be enabled.Function Calling (type=function)
Function Calling (type=function)
typestring(required)function.functionobject(required)Properties
Properties
namestring(required)get_current_weather or get_current_time.descriptionstring(optional)parametersobject(optional)Properties
Properties
typestring(required)object.propertiesobject(optional)location is a custom parameter name; its type and description describe the data type and purpose.requiredarray(optional)MCP (type=mcp)
MCP (type=mcp)
For the MCP configuration and invocation flow of Qwen3.8-Omni-Flash-Realtime, see Interaction flow.Required fields must be supplied when this MCP array element is present. Every addition or update requires both Must be Unique MCP server label within the session. Length: 1–64 characters; letters, digits, underscores, and hyphens only.MCP Streamable HTTP endpoint. Must be a public HTTPS address on port 443, up to 4096 characters, with no username, password, or fragment. Its domain must resolve to public addresses.Outbound Authorization value, up to 8192 printable ASCII characters.Additional outbound HTTP headers, up to 16 string-to-string pairs. Names must be 1–128 characters using standard HTTP header-name characters. Values must be printable ASCII and at most 8192 characters.Names cannot start with Filter applied after discovery. Omission allows all tools; an empty array exposes none. Each name is 1–64 characters, with letters, digits, underscores, periods, and hyphens only.Approval policy:
server_label and server_url; a label alone cannot reuse an existing configuration. Update MCP configuration only when there is no active Response. Connections, discovery, and calls are subject to quotas and timeouts. See MCP call limits.typestring(required)mcp.server_labelstring(required)server_urlstring(required)authorizationstring(optional)headersobject(optional)mcp-, proxy-, or x-forwarded-, or equal host, authorization, connection, content-length, transfer-encoding, accept, content-type, forwarded, cookie, origin, upgrade, te, or trailer.allowed_toolsarray of strings(optional)require_approvalstring(optional)always (default) or never.server_url, authorization, and headers are used only for the server-side connection and are not echoed in session.updated. Do not reconstruct sensitive settings from that event.temperaturefloat(optional)qwen3.8-omni-flash-realtime: 0.6- Qwen3.5-Omni-Realtime series model: 0.7
qwen3-omni-flash-realtime-2025-09-15: 0.9
top_pfloat(optional)qwen3.8-omni-flash-realtime: 0.95- Qwen3.5-Omni-Realtime series model: 0.8
qwen3-omni-flash-realtime-2025-09-15: 1.0
top_kinteger(optional)null or a value greater than 100 to disable top_k, in which case only top_p applies.Minimum value: 0.Default values:qwen3.8-omni-flash-realtime: 20- Qwen3.5-Omni-Realtime series model: 20
qwen3-omni-flash-realtime-2025-09-15: 50
max_tokensinteger(optional)TheFormax_tokenssetting does not affect the model's generation process. If the generated output exceedsmax_tokens, the response is truncated.
qwen3.8-omni-flash-realtime, the valid range is [1, 65536]. For other models, the default and maximum values equal the model's maximum output length. See Model list.Use max_tokens to limit output length for tasks like summarization, keyword extraction, cost control, or latency reduction.repetition_penaltyfloat(optional)qwen3.8-omni-flash-realtime also accepts 0. For other models, the value must be greater than 0.Default values:qwen3.8-omni-flash-realtime: 0- Qwen3.5-Omni-Realtime series model: 1.0
qwen3-omni-flash-realtime-2025-09-15: 1.05
presence_penaltyfloat(optional)qwen3.8-omni-flash-realtime: 1- Qwen3.5-Omni-Realtime series model: 1.5
qwen3-omni-flash-realtime-2025-09-15: 0.0
seedinteger(optional)- Default configuration
- MCP tools
- Two-channel audio
- Four-channel audio
- Compatible single-channel audio
- Output voice
- Video aggregation
response.create
The response.create event instructs the server to generate a model response. In VAD mode, the server normally starts responses from speech activity; tool continuations follow the explicit flow below. For Function Calling, send this event after returning the tool result via conversation.item.create to continue generation. For Qwen3.8-Omni-Flash-Realtime MCP tools, the server executes the call; if a model continuation is needed, send one response.create after response.done for the Response containing this MCP call, without attaching MCP results.
The server replies with a response.created event, followed by one or more item and content events—such as conversation.item.created and response.content_part.added—and finally a response.done event.
typestring(required)response.create.response.cancel
Send this event to cancel an ongoing response. If no response is in progress, the server returns an error.
typestring(required)response.cancel.input_audio_buffer.append
For WebSocket access, appends audio bytes to the input audio buffer.
typestring(required)input_audio_buffer.append.audiostring(required)input_audio_buffer.commit
Commits the input audio buffer, creating a new user message item in the conversation. If the buffer is empty, the server returns an error.
- VAD mode: The client does not need to send this event. The server commits the audio buffer automatically.
- Manual mode: The client must commit the audio buffer to create a user message item.
input_audio_buffer.committed event.
If the client sent an input_image_buffer.append event, the input_audio_buffer.commit event also commits the image buffer.
typestring(required)input_audio_buffer.commit.input_audio_buffer.clear
Clears audio bytes from the buffer. The server replies with an input_audio_buffer.cleared event.
typestring(required)input_audio_buffer.clear.input_image_buffer.append
For WebSocket access, adds image data to the image buffer. Images can come from a local file or be captured in real time from a video stream.
The following limits apply to image inputs:
- Format: JPG or JPEG. Recommended resolution: 480p or 720p; maximum: 1080p.
- A single image after Base64 encoding must not exceed 256 KB. We recommend keeping the raw image size below 190 KB before encoding.
- Image data must be Base64-encoded.
- Recommended send frequency: 1 image per second.
- Send at least one
input_audio_buffer.appendevent before sending aninput_image_buffer.appendevent.
The image buffer is committed with the audio buffer using the input_audio_buffer.commit event.
typestring(required)input_image_buffer.append.imagestring(required)conversation.item.create
Send this event to create a conversation item, either a Function Calling result or, for Qwen3.8-Omni-Flash-Realtime, an MCP approval response. For Function Calling, run the tool locally, return its result as function_call_output, then send response.create. The server executes MCP tools; use mcp_approval_response for approval and follow the approval response continuation sequence.
event_idstring(optional)typestring(required)conversation.item.create.itemobject(required)Properties
Properties
idstring(optional)typestring(required)function_call_output for a Function Calling result or mcp_approval_response for a Qwen3.8-Omni-Flash-Realtime MCP approval reply.call_idstring(conditionally required)function_call_output. Use the call_id returned in response.function_call_arguments.done.outputstring(conditionally required)function_call_output. The tool function execution result.approval_request_idstring(conditionally required)mcp_approval_response. Must exactly match the item.id of an unhandled mcp_approval_request.approveboolean(conditionally required)mcp_approval_response. true allows execution; false rejects the call, which enters failed.MCP approval response (Qwen3.8-Omni-Flash-Realtime)
When require_approval is always or omitted, the server may send mcp_approval_request. Reply using the conversation.item.create fields above with item.type="mcp_approval_response". The server executes the MCP tool. If a model continuation is needed, wait for response.done for the Response containing this MCP call, then send one response.create without MCP results.Approval request IDs, item IDs, and event IDs returned by the server are opaque strings. Do not rely on their lengths, prefixes, or generation rules.- Function Calling tool result
- MCP approval response (Qwen3.8-Omni-Flash-Realtime)
See Qwen-Omni-Realtime .