This article describes the server events of the Qwen-Omni-Realtime API, including events related to tool calling (Function Calling).
error
The error message returned by the server.
event_idstringtypestringerror.errorobjectProperties
Properties
typestringcodestringmessagestringparamstringsession.modalities.session.created
The first event returned by the server after the client connects, containing the default configuration for this connection.
event_idstringtypestringsession.created.sessionobjectProperties
Properties
objectstringrealtime.session.modelstringmodalitiesarrayvoicestringinput_audio_formatstringpcm. The input audio must be a PCM audio stream with a 16 kHz sample rate.output_audio_formatstringpcm. The output audio is a PCM audio stream with a 24 kHz sample rate. Custom output sample rates are not currently supported.input_audio_transcriptionobjectProperties
Properties
modelstringqwen3-asr-flash-realtime; it cannot be modified.turn_detectionobjectProperties
Properties
typestringserver_vad (default), semantic_vad, or semantic_vad_ec. Among them, semantic_vad_ec applies to the Qwen3.8-Omni-Flash-Realtime series of models. For more information, see Client events.thresholdfloatsilence_duration_msintegeridle_timeout_msintegerserver_vad mode when using the qwen3.5-omni-plus-realtime or qwen3.5-omni-flash-realtime model.enable_searchbooleansearch_optionsobjecttemperaturefloatqwen3.8-omni-flash-realtime in the Beijing region.session.updated
This event is returned when the user's session.update request is processed successfully; if an error occurs, an error event is returned.
event_idstringtypestringsession.updated.sessionobjectProperties
Properties
temperaturefloatmodalitiesarrayvoicestringinstructionsstringaudioobjectsession.audio.input.format / session.audio.output.format, the server will echo them in session.updated with the same nested structure. For clients that do not use nested fields, the server event structure keeps the original behavior.Properties
Properties
inputobjectProperties
Properties
formatobjectProperties
Properties
typestringpcm (default), wav.sample_rateintegeroutputobjectProperties
Properties
formatobjectProperties
Properties
typestringpcm (default), wav.sample_rateintegerinput_audio_formatstringoutput_audio_formatstringinput_audio_transcriptionobjectProperties
Properties
modelstringqwen3-asr-flash-realtime; it cannot be modified.turn_detectionobjectProperties
Properties
typestringserver_vad (default), semantic_vad, or semantic_vad_ec. Among them, semantic_vad_ec applies to the Qwen3.8-Omni-Flash-Realtime series of models. For more information, see Client events.thresholdfloatsilence_duration_msintegeridle_timeout_msintegerserver_vad mode when using the qwen3.5-omni-plus-realtime or qwen3.5-omni-flash-realtime model.enable_searchboolean(Optional)search_optionsobject(Optional)toolsarray(Optional)type="function". For the MCP configuration fields of Qwen3.8-Omni-Flash-Realtime, see Client tool configuration; MCP connection addresses and credentials are not echoed in session.updated.Properties
Properties
typestring(Required)function.functionobjectProperties
Properties
namestring(Required)get_current_weather or get_current_time.descriptionstring(Optional)parametersobject(Optional)Properties
Properties
typestring(Required)object.propertiesobject(Optional)type) and description (description).requiredarray(Optional)top_pfloattop_kintegermax_tokensintegerrepetition_penaltyfloatpresence_penaltyfloatseedintegerinput_audio_buffer.speech_started
In VAD mode, the server returns this event when it detects the start of speech in the audio buffer.
If the server has not yet detected speech, this event may be triggered each time audio is appended to the buffer.
event_idstringtypestringinput_audio_buffer.speech_started.audio_start_msintegeritem_idstringThe user message item is used to append user input to the conversation history for subsequent model inference and generation.
input_audio_buffer.speech_stopped
In VAD mode, the server returns this event when the end of speech is detected in the audio buffer.
Meanwhile, the server also returns a conversation.item.created event to create the corresponding user message item.
event_idstringtypestringinput_audio_buffer.speech_stopped.audio_end_msintegeritem_idstringinput_audio_buffer.committed
This event is returned when the input audio buffer is committed.
- In VAD mode, when the end of user speech is detected, the server automatically commits the audio buffer and returns this event.
- In Manual mode, the server returns this event after the client sends the
input_audio_buffer.commitevent.
event_idstringtypestringinput_audio_buffer.committed.item_idstringinput_audio_buffer.cleared
After the client sends the input_audio_buffer.clear event, the server returns this event.
event_idstringtypestringinput_audio_buffer.cleared.conversation.item.created
This event is returned when a conversation item is created.
event_idstringtypestringconversation.item.created.response_idstring(Conditionally required)item.type is mcp_approval_request; the parent Response ID of this MCP call.item_idstring(Conditionally required)item.type is mcp_approval_request; the item ID of the approval request, same as item.id.previous_item_idstring(Conditionally required)item.type is mcp_approval_request; the item ID of the mcp_call pending approval.itemobjectProperties
Properties
idstringobjectstringmessage and function_call items are fixed as realtime.item; if an MCP item returns this field, the value is also realtime.item.statusstringmcp_call item, with the value in_progress.rolestringcontentarray[object]message. The following fields correspond to the array elements in the example on this page.Array element
Array element
typestringinput_audio in the example on this page.typestringmessage (regular message) and function_call (tool calling). Qwen3.8-Omni-Flash-Realtime can also return mcp_list_tools, mcp_call, and mcp_approval_request; see MCP items for event examples.namestringfunction_call, the name of the function being called.call_idstringfunction_call, the unique ID of this function call.argumentsstringfunction_call, the arguments of the function call (JSON string).type=mcp_list_tools
type=mcp_list_tools
item.id is the same as the item_id of the tool discovery status event.server_labelstring(Required)toolsarray[object](Required)allowed_tools; an empty array when discovery fails.Array element
Array element
namestring(Required)descriptionstring(Optional)input_schemaobject(Required)Properties
Properties
typestring(Required)object.propertiesobject(Optional)city in the mcp_list_tools example below is a parameter name, whose type and description specify the data type and purpose respectively; the JSON Schema of each parameter is defined by the MCP Server.requiredarray[string](Optional)additionalProperties, $defs, oneOf, anyOf, and allOf are preserved and passed through as in the original schema.annotationsobject(Optional)Properties
Properties
titlestring(Optional)readOnlyHintboolean(Optional)destructiveHintboolean(Optional)idempotentHintboolean(Optional)openWorldHintboolean(Optional)errorobject(Optional)Properties
Properties
typestring(Required)tool_execution_error.messagestring(Required)type=mcp_call (initial item)
type=mcp_call (initial item)
objectstring(Required)realtime.item.statusstring(Required)in_progress.server_labelstring(Required)namestring(Required)call_idstring(Required)argumentsstring(Required)type=mcp_approval_request
type=mcp_approval_request
item.id of the approval request should be filled into approval_request_id as-is in the approval response.server_labelstring(Required)namestring(Required)argumentsstring(Required)call_idstring(Required)conversation.item.input_audio_transcription.delta
After input audio transcription is enabled, this event is sent at high frequency while the user is speaking, used to display intermediate results of real-time recognition. You can get the most complete current sentence preview by concatenating text + stash.
event_idstringtypestringconversation.item.input_audio_transcription.delta.item_idstringcontent_indexintegertextstringstashstringlanguagestringemotionstringneutral (calm), happy (joyful), sad (sad), angry (angry), surprised (surprised), disgusted (disgusted), fearful (fearful).text + stash.Click to view examples
Click to view examples
Timestamp | User speech progress | API response (text and stash) | Client UI should display (text + stash) |
|---|---|---|---|
T1 | "Today……" | text: "" stash: "Today" | Today |
T2 | "……weather……" | text: "" stash: "Today weather" | Today weather |
T3 | "……nice" | text: "Today" stash: "weather is nice" | The weather is nice today (Note: "today" has been confirmed and moved into text) |
T4 | (brief pause) | text: "The weather is nice today," stash: "" | The weather is nice today, (the first half of the sentence is fully confirmed) |
T5 | "...the sun..." | text: "The weather is nice today," stash: "the sun" | The weather is nice today, the sun |
T6 | "...is shining brightly." | text: "The weather is nice today," stash: "the sun is shining brightly." | The weather is nice today, the sun is shining brightly. |
T7 | (end of speech) | - | Use the transcript content of conversation.item.input_audio_transcription.completed as the final result. |
conversation.item.input_audio_transcription.completed
This event represents the transcription result generated after user audio is written to the buffer. The transcription is handled by the built-in speech recognition model (fixed to qwen3-asr-flash-realtime) and cannot be modified.
The transcription text generated by the speech recognition model may differ from the Qwen-Omni-Realtime model's understanding, and is for reference only.
event_idstringtypestringconversation.item.input_audio_transcription.completed.item_idstringcontent_indexintegertranscriptstringconversation.item.input_audio_transcription.failed
When input audio transcription is enabled, if the transcription of user audio fails, the server returns this event. This event is independent of the error event, making it easy for clients to identify.
event_idstringtypestringconversation.item.input_audio_transcription.failed.item_idstringcontent_indexintegererrorobjectProperties
Properties
codestringmessagestringparamstringresponse.created
This event is returned when the server generates a new model response.
event_idstringtypestringresponse.created.responseobjectProperties
Properties
idstringconversation_idstringobjectstringrealtime.response for this event.statusstring[completed, failed, in_progress, or incomplete].modalitiesarrayvoicestringoutputarrayresponse.done
After the response generation is completed, the server returns this event. The response object in the event contains all output items except the raw audio data.
event_idstringtypestringresponse.done.responseobjectProperties
Properties
idstringconversation_idstringobjectstringrealtime.response for this event.statusstringmodalitiesarrayvoicestringoutputarrayArray element
Array element
idstringtypestringmessage (regular message) and function_call (tool calling). Qwen3.8-Omni-Flash-Realtime also supports mcp_call; see event examples in MCP conversation items.objectstringmessage and function_call items are fixed as realtime.item; if an MCP item returns this field, the value is also realtime.item.statusstringrolestringcontentarraymessage; each element is an output content object.Array element
Array element
typestringtext when the output is plain text, and audio when the output contains audio.textstringtranscriptstringnamestringfunction_call, the name of the function being called.call_idstringfunction_call, the unique ID of the function call.argumentsstringfunction_call, the complete arguments of the function call (JSON string).type=mcp_call (final item)
type=mcp_call (final item)
statusstring(Required)completed or failed.server_labelstring(Required)namestring(Required)call_idstring(Required)argumentsstring(Required)outputstring(Optional)tools/call.result object; it may also appear in some failure scenarios.errorobject(Optional)Properties
Properties
typestring(Required)tool_execution_error.messagestring(Required)isError=true, the final status is failed, and the original output may also be retained.usageobjectProperties
Properties
total_tokensintegerinput_tokensintegeroutput_tokensintegerinput_tokens_detailsobjecttext_tokens (number of text tokens) and audio_tokens (number of audio tokens).output_tokens_detailsobjecttext_tokens (number of text tokens) and audio_tokens (number of audio tokens).pluginsobject(Optional)enable_search) is enabled.Properties
Properties
searchobjectProperties
Properties
countintegerstrategystringresponse.text.delta
When the output modality contains only text and the model incrementally generates new text, the server returns this event.
event_idstringtypestringresponse.text.delta.deltastringresponse_idstringitem_idstringoutput_indexintegercontent_indexintegerresponse.text.done
When the output modality contains only text and the model finishes generating the text, the server returns this event.
This event is also returned when the response is interrupted, incomplete, or canceled.
event_idstringtypestringresponse.text.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegertextstringresponse.audio.delta
When connected via WebSocket, if the output modality contains audio and the model incrementally generates new audio data, the server returns this event. When connected via WebRTC, audio is transmitted through RTP audio tracks and this event is not returned.
event_idstringtypestringresponse.audio.delta.response_idstringitem_idstringoutput_indexintegercontent_indexintegerdeltastringresponse.audio.done
When the output modality contains audio and the model finishes generating the audio data, the server returns this event.
This event is also returned when the response is interrupted, incomplete, or canceled.
event_idstringtypestringresponse.audio.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegerresponse.audio_transcript.delta
When the output modality contains audio and the model incrementally generates the text corresponding to the new audio, the server returns the response.audio_transcript.delta event.
event_idstringtypestringresponse.audio_transcript.delta.response_idstringitem_idstringoutput_indexintegercontent_indexintegerdeltastringresponse.audio_transcript.done
When the output modality contains audio and the model completes the audio transcription, the server returns the response.audio_transcript.done event.
event_idstringtypestringresponse.audio_transcript.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegertranscriptstringresponse.function_call_arguments.delta
When the model generates the argument string of a function call in streaming mode, the server pushes this event each time a new chunk is produced. The client should concatenate the delta fields of the events in the order received to obtain the argument text consistent with the current progress; the complete content is subject to the subsequent response.function_call_arguments.done.
event_idstringtypestringresponse.function_call_arguments.delta.response_idstringitem_idstringoutput_indexintegercall_idstringdone event in the same turn.deltastringresponse.function_call_arguments.done
All function call arguments have been fully generated. The arguments in this event is the complete argument string. The client can parse the arguments and invoke local tool functions after receiving this event; the complete arguments in this event is authoritative, not the concatenated delta result.
event_idstringtypestringresponse.function_call_arguments.done.response_idstringitem_idstringoutput_indexintegercall_idstringnamestringargumentsstringresponse.output_item.added
The server returns this event when a new item is created during response generation. The item type can be message (regular message) or function_call (tool calling); Qwen3.8-Omni-Flash-Realtime also supports mcp_call. For event examples, see MCP conversation items.
event_idstringtypestringresponse.output_item.added.response_idstringoutput_indexintegeritemobjectProperties
Properties
idstringobjectstringmessage and function_call items are fixed as realtime.item; if an MCP item returns this field, the value is also realtime.item.statusstringrolestringcontentarraymessage. It is initially an empty array in the examples on this page; for the content of the completed item, see the response.output_item.done example.typestringmessage (regular message) and function_call (tool calling); Qwen3.8-Omni-Flash-Realtime also supports mcp_call. For event examples, see MCP conversation items.namestringfunction_call, the name of the function being called.call_idstringfunction_call, the unique ID of this function call.argumentsstringfunction_call, the arguments of the function call (JSON string). Initially an empty string in the added event.type=mcp_call (initial item)
type=mcp_call (initial item)
objectstring(Required)realtime.item.statusstring(Required)in_progress.server_labelstring(Required)namestring(Required)call_idstring(Required)argumentsstring(Required)response.mcp_call_arguments.done and the final item.response.output_item.done
The server returns this event when a new item output is completed.
event_idstringtypestringresponse.output_item.done.response_idstringoutput_indexintegeritemobjectProperties
Properties
idstringobjectstringmessage and function_call items are fixed as realtime.item; if an MCP item returns this field, the value is also realtime.item.statusstringrolestringcontentarray[object]message. The following fields correspond to the array elements in the example on this page.Array element
Array element
typestringaudio in the examples on this page.textstringtypestringmessage (regular message) and function_call (tool calling); Qwen3.8-Omni-Flash-Realtime also supports mcp_call. For event examples, see MCP conversation items.namestringfunction_call, the name of the function being called.call_idstringfunction_call, the unique ID of this function call.argumentsstringfunction_call, the complete arguments of the function call (JSON string).type=mcp_call (final item)
type=mcp_call (final item)
statusstring(Required)completed or failed.server_labelstring(Required)namestring(Required)call_idstring(Required)argumentsstring(Required)outputstring(Optional)tools/call.result object; it may also appear in some failure scenarios.errorobject(Optional)Properties
Properties
typestring(Required)tool_execution_error.messagestring(Required)isError=true, the final status is failed, and the original output may also be retained.response.content_part.added
The server returns this event when a new content part is added to the assistant message item during response generation.
event_idstringtypestringresponse.content_part.added.response_idstringitem_idstringoutput_indexintegercontent_indexintegerpartobjectProperties
Properties
typestringtextstringresponse.content_part.done
The server returns this event when a content part in the assistant message item finishes streaming.
event_idstringtypestringresponse.content_part.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegerpartobjectProperties
Properties
typestringtextstringMCP Events
This section describes the WebSocket events and fields of qwen3.8-omni-flash-realtime. For basic events and fields, see the preceding event descriptions. In the table, "Required" means the field must be provided whenever the parent object is present. IDs are opaque strings; you should not rely on their length, prefix, or generation rules. The outer type of arguments and output is string, so the content must be parsed as JSON again when reading it. MCP connections, tool discovery, and tool calls are subject to service quotas and timeout limits.
mcp_list_tools.*
The following three events share the same field structure:
| Event type | Triggered when |
|---|---|
| mcp_list_tools.in_progress | Tool discovery for an MCP Server starts |
| mcp_list_tools.completed | Tool discovery succeeds and allowed_tools filtering is complete |
| mcp_list_tools.failed | Tool discovery fails, times out, or the result exceeds the service limit |
event_idstring(Required)typestring(Required)item_idstring(Required)mcp_list_tools.in_progress may arrive earlier than session.updated. For completed and failed, the server first sends a conversation.item.created containing the final tool list or the error, and then sends the status event with the same item_id.Examples:response.mcp_call_arguments.delta
event_idstring(Required)typestring(Required)response_idstring(Required)item_idstring(Required)output_indexinteger(Required)deltastring(Required)obfuscationstring(Optional)response.mcp_call_arguments.done
event_idstring(Required)typestring(Required)response_idstring(Required)item_idstring(Required)output_indexinteger(Required)argumentsstring(Required)response.mcp_call.*
| Event type | Triggered when |
|---|---|
| response.mcp_call.in_progress | Argument generation is complete and the call is approved or requires no approval; the MCP Server call starts |
| response.mcp_call.completed | The MCP tool call succeeds |
| response.mcp_call.failed | Connection, protocol, or tool business errors; approval rejection, approval timeout, call timeout, or cancellation |
event_idstring(Required)typestring(Required)item_idstring(Required)output_indexinteger(Required)MCP Conversation Items
The following objects are the possible types of item in events, applicable to Qwen3.8-Omni-Flash-Realtime.
mcp_list_tools
This object is returned via conversation.item.created.item; for its fields, see the type=mcp_list_tools branch of conversation.item.created.
Example:
Initial mcp_call
When the model selects an MCP tool, this object appears in response.output_item.added.item and may also be returned via conversation.item.created.item; for fields, see the corresponding item branches of response.output_item.added and conversation.item.created.
response.output_item.added example:
mcp_approval_request
This object is returned via conversation.item.created; for the top-level event fields and the approval request item fields, see conversation.item.created.
Example:
Final mcp_call
After an MCP call enters a terminal state, this object appears in response.output_item.done.item and is included in the final snapshot of the parent response.done.response.output; for fields, see the corresponding branches of response.output_item.done and response.done.
- Success
- Failed
MCP errors
MCP errors may occur during tool discovery or tool calling. For the error field when tool discovery fails, see the mcp_list_tools branch of conversation.item.created; for tool calling failures, see the mcp_call branch of response.output_item.done.
Related documentation: Real-time (Qwen-Omni-Realtime).