Server events for the Qwen-Omni-Realtime API, including tool calling (function calling) events.
error
Server error.
event_idstringtypestringerror.errorobjectProperties
Properties
typestringcodestringmessagestringparamstringsession.modalities.session.created
Returned when a client connects. Contains the default session configuration.
event_idstringtypestringsession.created.sessionobjectProperties
Properties
objectstringrealtime.session.modelstringmodalitiesarrayvoicestringinput_audio_formatstringpcm is supported (16 kHz sample rate).output_audio_formatstringpcm is supported (24 kHz sample rate).input_audio_transcriptionobjectProperties
Properties
modelstringqwen3-asr-flash-realtime. Not configurable.turn_detectionobjectProperties
Properties
typestringserver_vad (default), semantic_vad, or semantic_vad_ec. The semantic_vad_ec mode is supported by the Qwen3.8-Omni-Flash-Realtime series. See Client events.thresholdfloatsilence_duration_msintegeridle_timeout_msintegerserver_vad mode with qwen3.5-omni-plus-realtime or qwen3.5-omni-flash-realtime models.enable_searchbooleansearch_optionsobjecttemperaturefloatqwen3.8-omni-flash-realtime in the Beijing region.session.updated
Returned after a successful session.update request. On failure, an error event is returned instead.
event_idstringtypestringsession.updated.sessionobjectProperties
Properties
temperaturefloatmodalitiesarrayvoicestringinstructionsstringaudioobjectsession.audio.input.format / session.audio.output.format, the server echoes them in session.updated using the same nested structure. For clients that do not use the nested fields, the server event structure keeps the existing 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. Not configurable.turn_detectionobjectProperties
Properties
typestringserver_vad (default), semantic_vad, or semantic_vad_ec. The semantic_vad_ec mode is supported by the Qwen3.8-Omni-Flash-Realtime series. See Client events.thresholdfloatsilence_duration_msintegeridle_timeout_msintegerserver_vad mode with qwen3.5-omni-plus-realtime or qwen3.5-omni-flash-realtime models.enable_searchboolean(optional)search_optionsobject(optional)toolsarray(optional)type="function". See client tool configuration for Qwen3.8-Omni-Flash-Realtime MCP fields; MCP endpoints 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.requiredarray(optional)top_pfloattop_kintegermax_tokensintegerrepetition_penaltyfloatpresence_penaltyfloatseedintegerinput_audio_buffer.speech_started
In VAD mode, returned when the server detects speech onset in the audio buffer.
May be triggered each time audio is added to the buffer before speech is detected.
event_idstringtypestringinput_audio_buffer.speech_started.audio_start_msintegeritem_idstringUser message items append user input to the conversation history for model inference.
input_audio_buffer.speech_stopped
In VAD mode, returned when the server detects end-of-speech in the audio buffer.
Also returns a conversation.item.created event with the corresponding user message item.
event_idstringtypestringinput_audio_buffer.speech_stopped.audio_end_msintegeritem_idstringinput_audio_buffer.committed
Returned when the input audio buffer is committed.
- In VAD mode, the server automatically commits the buffer when it detects end-of-speech.
- In Manual mode, returned after the client sends an
input_audio_buffer.commitevent.
event_idstringtypestringinput_audio_buffer.committed.item_idstringinput_audio_buffer.cleared
Returned after the client sends an input_audio_buffer.clear event.
event_idstringtypestringinput_audio_buffer.cleared.conversation.item.created
Returned when a conversation item is created.
event_idstringtypestringconversation.item.created.response_idstring(conditionally required)item.type is mcp_approval_request; identifies the parent Response that generated the MCP call.item_idstring(conditionally required)item.type is mcp_approval_request; the approval item ID, equal to item.id.previous_item_idstring(conditionally required)item.type is mcp_approval_request; identifies the mcp_call item under review.itemobjectProperties
Properties
idstringobjectstringmessage and function_call items, this field is realtime.item. For MCP items, it has the same value when returned.statusstringmcp_call item requires it with the value in_progress.rolestringcontentarray of objectsmessage. The following fields describe the array element in this example.Array item
Array item
typestringinput_audio in this example.typestringmessage and function_call. Qwen3.8-Omni-Flash-Realtime also returns mcp_list_tools, mcp_call, and mcp_approval_request; see MCP item examples.namestringfunction_call.call_idstringtype is function_call, this is the unique ID of the function invocation.argumentsstringtype is function_call, this parameter contains the arguments for the function invocation as a JSON string.type=mcp_list_tools
type=mcp_list_tools
item.id matches the item_id in tool discovery status events.server_labelstring(required)toolsarray of objects(required)allowed_tools filtering; empty if discovery fails.Array item
Array item
namestring(required)descriptionstring(optional)input_schemaobject(required)Properties
Properties
typestring(required)object.propertiesobject(optional)city in the mcp_list_tools example is a parameter name; its type and description describe the data type and purpose. The MCP server defines each parameter's JSON Schema.requiredarray of strings(optional)additionalProperties, $defs, oneOf, anyOf, and allOf, pass through from 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 unchanged into approval_request_id when replying.server_labelstring(required)namestring(required)argumentsstring(required)call_idstring(required)conversation.item.input_audio_transcription.delta
Sent frequently while the user is speaking when input audio transcription is enabled. Provides real-time intermediate transcription results. Concatenate text + stash for the most complete sentence preview at any point.
event_idstringtypestringconversation.item.input_audio_transcription.delta.item_idstringcontent_indexintegertextstringstashstringlanguagestringemotionstringneutral, happy, sad, angry, surprised, disgusted, fearful.text + stash.Click to view example
Click to view example
Time | User speech progress | API response (text and stash) | Client UI display (text + stash) |
|---|---|---|---|
T1 | "The weather..." | text: "" stash: "The weather" | The weather |
T2 | "...is nice..." | text: "" stash: "The weather is nice" | The weather is nice |
T3 | "...today," | text: "The weather" stash: " is nice today," | The weather is nice today, ("The weather" has been confirmed and moved to text) |
T4 | (brief pause) | text: "The weather is nice today, " stash: "" | The weather is nice today, (first clause fully confirmed) |
T5 | "sunny..." | text: "The weather is nice today, " stash: "sunny" | The weather is nice today, sunny |
T6 | "...and warm." | text: "The weather is nice today, " stash: "sunny and warm." | The weather is nice today, sunny and warm. |
T7 | (stops speaking) | - | Use the transcript from conversation.item.input_audio_transcription.completed as the final result. |
conversation.item.input_audio_transcription.completed
Indicates that the user's audio has been transcribed by the built-in speech recognition model (qwen3-asr-flash-realtime). Not configurable.
The transcribed text from the speech recognition model may differ from the interpretation generated by the Qwen-Omni-Realtime model. The transcription is for reference only.
event_idstringtypestringconversation.item.input_audio_transcription.completed.item_idstringcontent_indexintegertranscriptstringconversation.item.input_audio_transcription.failed
Returned when input audio transcription is enabled and the transcription fails. Independent of the error event; helps clients identify transcription failures specifically.
event_idstringtypestringconversation.item.input_audio_transcription.failed.item_idstringcontent_indexintegererrorobjectProperties
Properties
codestringmessagestringparamstringresponse.created
Returned when the server starts generating a new response.
event_idstringtypestringresponse.created.responseobjectProperties
Properties
idstringconversation_idstringobjectstringrealtime.response.statusstringcompleted, failed, in_progress, or incomplete.modalitiesarrayvoicestringoutputarrayresponse.done
Returned after the response is fully generated. The response object includes all output items except raw audio data.
event_idstringtypestringresponse.done.responseobjectProperties
Properties
idstringconversation_idstringobjectstringrealtime.response.statusstringmodalitiesarrayvoicestringoutputarrayArray item
Array item
idstringtypestringmessage and function_call. Qwen3.8-Omni-Flash-Realtime also supports mcp_call; see MCP item examples.objectstringmessage and function_call items, this field is realtime.item. For MCP items, it has the same value when returned.statusstringrolestringcontentarraytype is message. Each array element is a content-part object.Array item
Array item
typestringtext for plain text output or audio for audio output.textstringtranscriptstringnamestringfunction_call.call_idstringtype is function_call, this is the unique ID of the function invocation.argumentsstringtype is function_call, this field contains the full arguments for the function call as a 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. It may also appear in some failure cases.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 present.usageobjectProperties
Properties
total_tokensintegerinput_tokensintegeroutput_tokensintegerinput_tokens_detailsobjecttext_tokens and audio_tokens.output_tokens_detailsobjecttext_tokens and audio_tokens.pluginsobject(optional)enable_search) is enabled.Properties
Properties
searchobjectProperties
Properties
countintegerstrategystringresponse.text.delta
Returned when the output modality is text-only and the model generates new text incrementally.
event_idstringtypestringresponse.text.delta.deltastringresponse_idstringitem_idstringoutput_indexintegercontent_indexintegerresponse.text.done
Returned when the output modality is text-only and the model finishes generating text.
Also returned if the response is interrupted, incomplete, or canceled.
event_idstringtypestringresponse.text.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegertextstringresponse.audio.delta
For WebSocket access, the server returns this event when the output modalities include audio and the model incrementally generates new audio data. For WebRTC access, audio is transmitted over RTP audio tracks, and this event is not returned.
event_idstringtypestringresponse.audio.delta.response_idstringitem_idstringoutput_indexintegercontent_indexintegerdeltastringresponse.audio.done
Returned when the output modality includes audio and the model finishes generating audio data.
Also returned if the response is interrupted, incomplete, or canceled.
event_idstringtypestringresponse.audio.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegerresponse.audio_transcript.delta
Returned when the output modality includes audio and the model generates new response.audio_transcript.delta transcript text incrementally.
event_idstringtypestringresponse.audio_transcript.delta.response_idstringitem_idstringoutput_indexintegercontent_indexintegerdeltastringresponse.audio_transcript.done
Returned as a response.audio_transcript.done event when the output modality includes audio and the model completes the audio transcript.
event_idstringtypestringresponse.audio_transcript.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegertranscriptstringresponse.function_call_arguments.delta
Returned as the model streams function call arguments. Concatenate the delta fields in order to build the argument string. The complete content is provided in the subsequent response.function_call_arguments.done event.
event_idstringtypestringresponse.function_call_arguments.delta.response_idstringitem_idstringoutput_indexintegercall_idstringdone event in the same turn.deltastringresponse.function_call_arguments.done
Indicates that function call arguments are fully generated. The arguments field contains the complete argument string. Use the arguments from this event — not the concatenated delta results — to parse and call the local function.
event_idstringtypestringresponse.function_call_arguments.done.response_idstringitem_idstringoutput_indexintegercall_idstringnamestringargumentsstringresponse.output_item.added
Returned when a new item is created during response generation. The item type can be message or function_call; Qwen3.8-Omni-Flash-Realtime also supports mcp_call; see MCP item examples.
event_idstringtypestringresponse.output_item.added.response_idstringoutput_indexintegeritemobjectProperties
Properties
idstringobjectstringmessage and function_call items, this field is realtime.item. For MCP items, it has the same value when returned.statusstringrolestringcontentarraymessage. The array is initially empty in this example; see the completed item in the response.output_item.done example.typestringmessage and function_call. Qwen3.8-Omni-Flash-Realtime also supports mcp_call; see MCP item examples.namestringtype is function_call.call_idstringfunction_call.argumentsstringtype is function_call. Initially an empty string in added events.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 for full arguments.response.output_item.done
Returned when an output item is fully generated.
event_idstringtypestringresponse.output_item.done.response_idstringoutput_indexintegeritemobjectProperties
Properties
idstringobjectstringmessage and function_call items, this field is realtime.item. For MCP items, it has the same value when returned.statusstringrolestringcontentarray of objectsmessage. The following fields describe the array element in this example.Array item
Array item
typestringaudio in this example.textstringtypestringmessage and function_call. Qwen3.8-Omni-Flash-Realtime also supports mcp_call; see MCP item examples.namestringfunction_call.call_idstringtype is function_call, this is the unique ID for the function invocation.argumentsstringtype is function_call, contains the full function call arguments as a 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. It may also appear in some failure cases.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 present.response.content_part.added
Returned when a new content part is added to an assistant message item during response generation.
event_idstringtypestringresponse.content_part.added.response_idstringitem_idstringoutput_indexintegercontent_indexintegerpartobjectProperties
Properties
typestringtextstringresponse.content_part.done
Returned when streaming of a content part within an assistant message item finishes.
event_idstringtypestringresponse.content_part.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegerpartobjectProperties
Properties
typestringtextstringMCP events
This section describes WebSocket events and fields for qwen3.8-omni-flash-realtime. Other base events and fields use the common protocol documented above. Required fields are required when their containing object is present. IDs are opaque strings; do not rely on their lengths, prefixes, or generation rules. arguments and output are strings whose contents require JSON parsing. MCP connections, discovery, and calls are subject to service quotas and timeouts.
mcp_list_tools.*
| Event type | When emitted |
|---|---|
mcp_list_tools.in_progress | Tool discovery starts for an MCP server. |
mcp_list_tools.completed | Discovery succeeds and allowed_tools filtering completes. |
mcp_list_tools.failed | Discovery fails, times out, or exceeds service limits. |
event_idstring(Required)typestring(Required)item_idstring(Required)mcp_list_tools item.in_progress can arrive before session.updated. For completed and failed, conversation.item.created containing the final tool list or error arrives first, followed by the status event with the same item_id.response.mcp_call_arguments.delta
event_idstring(Required)typestring(Required)response.mcp_call_arguments.deltaresponse_idstring(Required)item_idstring(Required)mcp_call item ID.output_indexinteger(Required)deltastring(Required)obfuscationstring(Optional)response.mcp_call_arguments.done
event_idstring(Required)typestring(Required)response.mcp_call_arguments.doneresponse_idstring(Required)item_idstring(Required)output_indexinteger(Required)argumentsstring(Required)response.mcp_call.*
| Event type | When emitted |
|---|---|
response.mcp_call.in_progress | Arguments are complete and approval has been granted or is unnecessary; the MCP call starts. |
response.mcp_call.completed | The MCP call succeeds. |
response.mcp_call.failed | Connection, protocol, or tool business error; approval rejection or timeout; call timeout; or cancellation. |
event_idstring(Required)typestring(Required)item_idstring(Required)mcp_call.output_indexinteger(Required)MCP conversation items
These objects are types of the item field in events, applicable to Qwen3.8-Omni-Flash-Realtime.
mcp_list_tools item
Returned as conversation.item.created.item; see the type=mcp_list_tools branch under conversation.item.created for its fields.
Example:
Initial mcp_call item
When the model selects an MCP tool, this item appears in response.output_item.added.item and may also appear in conversation.item.created.item; see the corresponding item branches under response.output_item.added and conversation.item.created.
response.output_item.added example:
mcp_approval_request item
Returned in conversation.item.created; see conversation.item.created for the event and approval item fields.
Example:
Final mcp_call item
After a call reaches a terminal state, the item appears in response.output_item.done.item and in the final parent response.done.response.output snapshot; see the corresponding branches under response.output_item.done and response.done.
- Success
- Failure
MCP errors
MCP errors can occur during tool discovery or tool execution. For discovery errors, see error under the mcp_list_tools branch of conversation.item.created; for execution errors, see the mcp_call branch of response.output_item.done.
See Qwen-Omni-Realtime.