Skip to main content

Qwen-Omni-Realtime server events

This article describes the server events of the Qwen-Omni-Realtime API, including events related to tool calling (Function Calling).

This page is the event reference for Qwen-Omni-Realtime. Event definitions are based on WebSocket access. AOQ and WebRTC send and receive model events through their respective data channels, while media is transmitted over media tracks. Read WebSocket access, WebRTC access, or AOQ access first.
For WebSocket SDK usage, see Python SDK and Java SDK. For model and protocol selection, see Overview.

error

The error message returned by the server.
event_idstring
The unique identifier of this event.
typestring
The event type, fixed as error.
errorobject
Detailed information about the error.
typestring
The error type.
codestring
The error code.
messagestring
The error message.
paramstring
The parameter related to the error, such as session.modalities.
{
  "event_id": "event_RoUu4T8yExPMI37GKwaOC",
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_value",
    "message": "Invalid modalities: ['audio']. Supported combinations are: ['text'] and ['audio', 'text'].",
    "param": "session.modalities"
  }
}

session.created

The first event returned by the server after the client connects, containing the default configuration for this connection.
event_idstring
The unique identifier of this event.
typestring
The event type, fixed as session.created.
sessionobject
The configuration information of the session.
objectstring
Fixed as realtime.session.
modelstring
The model in use.
modalitiesarray
The output modality settings of the model.
voicestring
The voice of the audio generated by the model.
input_audio_formatstring
The format of the user's input audio. Currently, it can only be set to pcm. The input audio must be a PCM audio stream with a 16 kHz sample rate.
output_audio_formatstring
The format of the model's output audio. Currently, it can only be set to pcm. The output audio is a PCM audio stream with a 24 kHz sample rate. Custom output sample rates are not currently supported.
input_audio_transcriptionobject
The speech transcription configuration.
modelstring
The speech transcription model, fixed as qwen3-asr-flash-realtime; it cannot be modified.
turn_detectionobject
The configuration of voice activity detection (VAD).
typestring
The VAD type. Values: server_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.
thresholdfloat
VAD detection threshold.
silence_duration_msinteger
Duration of silence used to detect the end of speech.
idle_timeout_msinteger
Silence timeout (in milliseconds). Only returned in server_vad mode when using the qwen3.5-omni-plus-realtime or qwen3.5-omni-flash-realtime model.
enable_searchboolean
Whether to enable the web search feature. Supported by the Qwen3.8-Omni-Flash-Realtime and Qwen3.5-Omni-Realtime series models.
search_optionsobject
Web search options configuration.
temperaturefloat
The temperature parameter of the model.
The following is an example of the default session returned by qwen3.8-omni-flash-realtime in the Beijing region.
{
    "event_id": "event_QQubXbhHMyXmKaSuE6PQ8",
    "type": "session.created",
    "session": {
        "input_audio_format": "pcm",
        "input_audio_transcription": {
            "model": "qwen3-asr-flash-realtime"
        },
        "id": "sess_MjEctgJ4ziXPEioCzSSvK",
        "object": "realtime.session",
        "modalities": [
            "text",
            "audio"
        ],
        "turn_detection": {
            "type": "server_vad",
            "silence_duration_ms": 800,
            "interrupt_response": true,
            "create_response": true,
            "threshold": 0.5,
            "prefix_padding_ms": 300
        },
        "model": "qwen3.8-omni-flash-realtime",
        "voice": "Tina",
        "output_audio_format": "pcm"
    }
}

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_idstring
The unique identifier of this event.
typestring
The event type, fixed as session.updated.
sessionobject
The configuration information of the session.
temperaturefloat
The temperature parameter of the model.
modalitiesarray
The output modality settings of the model.
voicestring
The voice of the audio generated by the model.
instructionsstring
The goal and role of the model.
audioobject
The echoed audio format configuration. If the client passes session.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.
inputobject
formatobject
typestring
The user input audio format. Valid values: pcm (default), wav.
sample_rateinteger
The user input audio sample rate, in Hz.
outputobject
formatobject
typestring
The model output audio format. Valid values: pcm (default), wav.
sample_rateinteger
The model output audio sample rate, in Hz.
input_audio_formatstring
A legacy compatibility field that echoes the input audio format configured by the client.
output_audio_formatstring
A legacy compatibility field that echoes the output audio format configured by the client.
input_audio_transcriptionobject
The speech transcription configuration.
modelstring
The speech transcription model, fixed as qwen3-asr-flash-realtime; it cannot be modified.
turn_detectionobject
The configuration of voice activity detection (VAD).
typestring
The VAD type. Values: server_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.
thresholdfloat
VAD detection threshold.
silence_duration_msinteger
Duration of silence used to detect the end of speech.
idle_timeout_msinteger
Silence timeout (in milliseconds). Only returned in server_vad mode when using the qwen3.5-omni-plus-realtime or qwen3.5-omni-flash-realtime model.
enable_searchboolean(Optional)
Whether to enable the web search feature. Supported by the Qwen3.8-Omni-Flash-Realtime and Qwen3.5-Omni-Realtime series models.
search_optionsobject(Optional)
Web search options configuration.
toolsarray(Optional)
The list of tool definitions. The following properties describe Function Calling tools with 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.
typestring(Required)
Fixed as function.
functionobject
namestring(Required)
The custom tool function name. It is recommended to use the same name as the function, such as get_current_weather or get_current_time.
descriptionstring(Optional)
A description of the tool function's capability. The model references this field to decide whether to use the tool function.
parametersobject(Optional)
A description of the tool function's input parameters. The model references this field to extract the input parameters. If the tool function does not require input parameters, this field is unnecessary.
typestring(Required)
Fixed as object.
propertiesobject(Optional)
Describes the name, data type, and description of each input parameter. The Key is the name of an input parameter, and the Value is an object containing the data type (type) and description (description).
requiredarray(Optional)
Specifies which input parameters are required.
top_pfloat
The probability threshold for nucleus sampling.
top_kinteger
The size of the sampling candidate set during model generation.
max_tokensinteger
The maximum number of tokens the model returns in this request.
repetition_penaltyfloat
Controls the degree of repetition in consecutive sequences during model generation*.*
presence_penaltyfloat
Controls the degree of repetition when the model generates content.
seedinteger
The degree of consistency of the model's results across requests.
{
    "event_id": "event_X1HsXS4b4uptp6yo1LgKd",
    "type": "session.updated",
    "session": {
        "id": "sess_Aih6vAcY5Ddt6jwFx1tCa",
        "object": "realtime.session",
        "model": "qwen3.5-omni-flash-realtime",
        "modalities": [
            "text",
            "audio"
        ],
        "audio": {
            "input": {
                "format": {
                    "type": "pcm",
                    "sample_rate": 16000
                }
            },
            "output": {
                "format": {
                    "type": "wav",
                    "sample_rate": 24000
                }
            }
        },
        "instructions": "你是个人助理小云,请你准确且友好地解答用户的问题,始终以乐于助人的态度回应。",
        "voice": "Tina",
        "input_audio_format": "pcm",
        "output_audio_format": "pcm",
        "input_audio_transcription": {
            "model": "qwen3-asr-flash-realtime"
        },
        "turn_detection": {
            // VAD 类型及各模式的支持范围参见客户端事件中的 turn_detection.type
            "type": "server_vad",
            "threshold": 0.1,
            "prefix_padding_ms": 500,
            "silence_duration_ms": 900,
            "create_response": true,
            "interrupt_response": true
        },
        "enable_search": false,
        "search_options": {},
        "tools": [
            {
                "type": "function",
                "function": {
                    "name": "get_current_weather",
                    "description": "当你想查询指定城市的天气时非常有用。",
                    "parameters": {
                        "type": "object",
                        "properties": {
                            "location": {"type": "string", "description": "城市名称"}
                        },
                        "required": ["location"]
                    }
                }
            }
        ],
        "temperature": 0.8,
        "max_response_output_token": "inf",
        "max_tokens": 16384,
        "repetition_penalty": 1.05,
        "presence_penalty": 0.0,
        "top_k": 50,
        "top_p": 1.0,
        "seed":-1
    }
}

input_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_idstring
The unique identifier of this event.
typestring
The event type, fixed as input_audio_buffer.speech_started.
audio_start_msinteger
The number of milliseconds elapsed from when audio started being written to the buffer until speech was first detected.
item_idstring
The ID of the user message item that will be created when speech stops.
The user message item is used to append user input to the conversation history for subsequent model inference and generation.
{
    "event_id": "event_Pvp8nEhsQuGCQbFJ9x58n",
    "type": "input_audio_buffer.speech_started",
    "audio_start_ms": 3647,
    "item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}

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_idstring
The unique identifier of this event.
typestring
The event type, fixed as input_audio_buffer.speech_stopped.
audio_end_msinteger
The number of milliseconds elapsed from the start of the session to the moment speech stopped.
item_idstring
The ID of the user message item to be created.
{
    "event_id": "event_UhQiqNVRsgUiq4KUS5Xb5",
    "type": "input_audio_buffer.speech_stopped",
    "audio_end_ms": 4453,
    "item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}

input_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.commit event.
event_idstring
The unique identifier of this event.
typestring
The event type, fixed as input_audio_buffer.committed.
item_idstring
The ID of the user message item to be created.
{
    "event_id": "event_Iy6sUzL1nmdFgshFYxJEz",
    "type": "input_audio_buffer.committed",
    "item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}

input_audio_buffer.cleared

After the client sends the input_audio_buffer.clear event, the server returns this event.
event_idstring
The unique identifier of this event.
typestring
The event type, fixed as input_audio_buffer.cleared.
{
  "event_id": "event_RoUu4T8yExPMI37GKwaOC",
  "type": "input_audio_buffer.cleared"
}

conversation.item.created

This event is returned when a conversation item is created.
event_idstring
The unique identifier of this event.
typestring
The event type, fixed as conversation.item.created.
response_idstring(Conditionally required)
Returned only when item.type is mcp_approval_request; the parent Response ID of this MCP call.
item_idstring(Conditionally required)
Returned only when item.type is mcp_approval_request; the item ID of the approval request, same as item.id.
previous_item_idstring(Conditionally required)
Returned only when item.type is mcp_approval_request; the item ID of the mcp_call pending approval.
itemobject
The item to be added to the conversation.
idstring
The unique ID of the conversation item.
objectstring
message and function_call items are fixed as realtime.item; if an MCP item returns this field, the value is also realtime.item.
statusstring
If this field is returned, it indicates the status of the conversation item. Required for the initial mcp_call item, with the value in_progress.
rolestring
Included only in message items, indicating the role of the message.
contentarray[object]
The content of the message. Present when type is message. The following fields correspond to the array elements in the example on this page.

Array element

typestring
The type of the content part; input_audio in the example on this page.
typestring
The type of the conversation item includes message (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.
namestring
When type is function_call, the name of the function being called.
call_idstring
When type is function_call, the unique ID of this function call.
argumentsstring
When type is function_call, the arguments of the function call (JSON string).

type=mcp_list_tools

For this type, item.id is the same as the item_id of the tool discovery status event.
server_labelstring(Required)
MCP Server identity.
toolsarray[object](Required)
Tool definitions filtered by validation and allowed_tools; an empty array when discovery fails.

Array element

namestring(Required)
The original name of the tool, 1-64 characters, allowing only letters, digits, underscores, dots, and hyphens.
descriptionstring(Optional)
The description of the tool provided by the MCP Server.
input_schemaobject(Required)
The JSON Schema provided by the MCP Server. The server does not perform full JSON Schema semantic validation; tool arguments are ultimately validated by the MCP Server.
typestring(Required)
The root node is fixed as object.
propertiesobject(Optional)
Lists each parameter by its custom name. For example, 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)
List of required parameter names.Other standard JSON Schema fields such as additionalProperties, $defs, oneOf, anyOf, and allOf are preserved and passed through as in the original schema.
annotationsobject(Optional)
ToolAnnotations provided by the MCP Server. The following are optional hint fields defined in the MCP standard; the actual returned content is determined by the MCP Server.
titlestring(Optional)
The display name of the tool.
readOnlyHintboolean(Optional)
A hint indicating whether the tool is read-only.
destructiveHintboolean(Optional)
A hint indicating whether the tool may perform destructive modifications.
idempotentHintboolean(Optional)
A hint indicating whether repeated calls produce no additional effects.
openWorldHintboolean(Optional)
A hint indicating whether the tool may interact with external systems. All these fields are hints only and should not be used as the basis for security decisions.
errorobject(Optional)
Present when tool discovery fails.
typestring(Required)
Fixed as tool_execution_error.
messagestring(Required)
A safe, client-facing description of the error, excluding sensitive upstream response bodies.

type=mcp_call (initial item)

objectstring(Required)
Fixed as realtime.item.
statusstring(Required)
Initially in_progress.
server_labelstring(Required)
The identifier of the MCP Server that actually executes the tool.
namestring(Required)
The original name of the tool.
call_idstring(Required)
The unique ID of this call.
argumentsstring(Required)
Initially usually an empty string; the complete arguments are subject to subsequent events and the final item.

type=mcp_approval_request

The item.id of the approval request should be filled into approval_request_id as-is in the approval response.
server_labelstring(Required)
The identifier of the MCP Server that the tool to be executed belongs to.
namestring(Required)
The original name of the tool to be executed.
argumentsstring(Required)
The complete parameter JSON string of the call pending approval.
call_idstring(Required)
The ID of the tool call being approved.
Examples:
{
    "event_id": "event_JEfkrr9gO3Ny7Xcv9bGVd",
    "type": "conversation.item.created",
    "item": {
        "id": "item_YbAiGvK2H7YaS34o4R6Ba",
        "object": "realtime.item",
        "type": "message",
        "status": "in_progress",
        "role": "assistant",
        "content": [
            {
                "type": "input_audio"
            }
        ]
    }
}
// 工具调用场景
{
    "event_id": "event_S1hkaIQgcuQD8OEdOpGHQ",
    "type": "conversation.item.created",
    "item": {
        "id": "item_FEG9qJGNkPcdf4et3p7BV",
        "object": "realtime.item",
        "type": "function_call",
        "status": "in_progress",
        "call_id": "call_bc0a7fb7235840f69ecfe4",
        "name": "get_current_weather",
        "arguments": ""
    }
}

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_idstring
The unique identifier of this event.
typestring
The event type, fixed as conversation.item.input_audio_transcription.delta.
item_idstring
The ID of the associated conversation item.
content_indexinteger
The index of the content part containing the audio.
textstring
The confirmed text prefix. This is the part of the current sentence that the model has confirmed will not change again.
stashstring
The pre-recognized text suffix. This is a temporary draft immediately following the confirmed part, which the model is still processing and may be revised.
languagestring
The language of the recognized audio.
emotionstring
The emotion of the recognized audio. Optional values: neutral (calm), happy (joyful), sad (sad), angry (angry), surprised (surprised), disgusted (disgusted), fearful (fearful).
{
    "event_id": "event_C7jzoeSFuiwOZS6tR14yx",
    "type": "conversation.item.input_audio_transcription.delta",
    "item_id": "item_ThVYhLHOdeXb4bBSvzSFF",
    "content_index": 0,
    "text": "",
    "stash": "今天天气怎么样?",
    "language": "zh",
    "emotion": "neutral",
    "obfuscation": "ABEXGYmxdmc97u"
}
At any moment, to get the most complete current sentence preview, you need to concatenate these two fields: real-time preview sentence = text + stash.
Suppose the user is saying: "The weather is nice today, and the sunshine is bright."The following is the event stream you might receive and how to interpret it:

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_idstring
The unique identifier of this event.
typestring
Event type, fixed as conversation.item.input_audio_transcription.completed.
item_idstring
The ID of the user message item.
content_indexinteger
Currently fixed to 0.
transcriptstring
The text content of the transcription.
{
    "event_id": "event_FrrZcxiDfTB9LD9p4pVng",
    "type": "conversation.item.input_audio_transcription.completed",
    "item_id": "item_YbAiGvK2H7YaS34o4R6Ba",
    "content_index": 0,
    "transcript": "喂,你好。"
}

conversation.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_idstring
The unique identifier of this event.
typestring
Event type, fixed as conversation.item.input_audio_transcription.failed.
item_idstring
The ID of the user message item.
content_indexinteger
Currently fixed to 0.
errorobject
The error message.
codestring
The error code.
messagestring
Error message.
paramstring
Parameters related to the error.
{
  "type": "conversation.item.input_audio_transcription.failed",
  "item_id": "<item_id>",
  "content_index": 0,
  "error": {
    "code": "<code>",
    "message": "<message>",
    "param": "<param>"
  }
}

response.created

This event is returned when the server generates a new model response.
event_idstring
The unique identifier of this event.
typestring
Event type, fixed as response.created.
responseobject
The response object.
idstring
The unique ID of the response.
conversation_idstring
The unique ID of the current session.
objectstring
Object type, fixed as realtime.response for this event.
statusstring
The status of the response. Within the range of [completed, failed, in_progress, or incomplete].
modalitiesarray
The modality of the response.
voicestring
The voice of the audio generated by the model.
outputarray
Currently empty for this event.
{
    "event_id": "event_XuDavMzQN3KKepqGu3KRh",
    "type": "response.created",
    "response": {
        "id": "resp_HaVOPdbmX6vifiV5pAfJY",
        "object": "realtime.response",
        "conversation_id": "conv_FjJaccpnvwHNo9cPVuzGc",
        "status": "in_progress",
        "modalities": [
            "text",
            "audio"
        ],
        "voice": "Cherry",
        "output_audio_format": "pcm",
        "output": []
    }
}

response.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_idstring
The unique identifier of this event.
typestring
Event type, fixed as response.done.
responseobject
The response object.
idstring
The unique ID of the response.
conversation_idstring
The unique ID of the current session.
objectstring
Object type, fixed as realtime.response for this event.
statusstring
The status of the response.
modalitiesarray
The modality of the response.
voicestring
The voice of the audio generated by the model.
outputarray
The array of response output items; each element is a conversation item object.

Array element

idstring
The ID corresponding to the response output.
typestring
The type of the output item; available values include message (regular message) and function_call (tool calling). Qwen3.8-Omni-Flash-Realtime also supports mcp_call; see event examples in MCP conversation items.
objectstring
message and function_call items are fixed as realtime.item; if an MCP item returns this field, the value is also realtime.item.
statusstring
The status of the output item.
rolestring
Included only in message items, indicating the role of the message.
contentarray
The content of the output item. Present when type is message; each element is an output content object.

Array element

typestring
The type of the output content. It is text when the output is plain text, and audio when the output contains audio.
textstring
The text content of the output.
transcriptstring
The content of the audio transcribed into text.
namestring
When type is function_call, the name of the function being called.
call_idstring
When type is function_call, the unique ID of the function call.
argumentsstring
When type is function_call, the complete arguments of the function call (JSON string).

type=mcp_call (final item)

statusstring(Required)
completed or failed.
server_labelstring(Required)
The identifier of the MCP Server that actually executes the tool.
namestring(Required)
The original name of the tool.
call_idstring(Required)
The unique ID of this call.
argumentsstring(Required)
The complete arguments as a JSON string.
outputstring(Optional)
The JSON string of the serialized MCP tools/call.result object; it may also appear in some failure scenarios.
errorobject(Optional)
Appears when the call fails.
typestring(Required)
Fixed as tool_execution_error.
messagestring(Required)
A safe, client-facing description of the error, excluding sensitive upstream response bodies.
When the MCP Server returns isError=true, the final status is failed, and the original output may also be retained.
usageobject
Token usage information for this response.
total_tokensinteger
The total number of tokens consumed by this response.
input_tokensinteger
The number of input tokens.
output_tokensinteger
The number of output tokens.
input_tokens_detailsobject
Detailed breakdown of input tokens, including text_tokens (number of text tokens) and audio_tokens (number of audio tokens).
output_tokens_detailsobject
Detailed breakdown of output tokens, including text_tokens (number of text tokens) and audio_tokens (number of audio tokens).
pluginsobject(Optional)
Plugin usage metering information. Returned when web search (enable_search) is enabled.
searchobject
Web search metering information.
countinteger
Number of searches.
strategystring
Search policy.
Examples:
{
    "event_id": "event_CSaxRRYLvbrfexDXAEuDG",
    "type": "response.done",
    "response": {
        "id": "resp_HaVOPdbmX6vifiV5pAfJY",
        "object": "realtime.response",
        "conversation_id": "conv_FjJaccpnvwHNo9cPVuzGc",
        "status": "completed",
        "modalities": [
            "text",
            "audio"
        ],
        "voice": "Cherry",
        "output_audio_format": "pcm",
        "output": [
            {
                "id": "item_Ls6MtCUWO7LM4E59QziNv",
                "object": "realtime.item",
                "type": "message",
                "status": "completed",
                "role": "assistant",
                "content": [
                    {
                        "type": "audio",
                        "transcript": "你好呀!有什么我可以帮你的吗?"
                    }
                ]
            }
        ],
        "usage": {
            "total_tokens": 377,
            "input_tokens": 336,
            "output_tokens": 41,
            "input_tokens_details": {
                "text_tokens": 228,
                "audio_tokens": 108
            },
            "output_tokens_details": {
                "text_tokens": 9,
                "audio_tokens": 32
            },
            "plugins": {
                "search": {
                    "count": 1,
                    "strategy": "agent"
                }
            }
        }
    }
}
// 工具调用场景
{
    "event_id": "event_T1EFAJp43X2DWtDRmxTtx",
    "type": "response.done",
    "response": {
        "id": "resp_TucN5QgymL5MA8vkJvFlS",
        "object": "realtime.response",
        "conversation_id": "conv_SEDZESRlefT8WvLSmEn6E",
        "status": "completed",
        "modalities": ["text", "audio"],
        "voice": "Ethan",
        "output_audio_format": "pcm",
        "output": [
            {
                "id": "item_FEG9qJGNkPcdf4et3p7BV",
                "object": "realtime.item",
                "type": "function_call",
                "status": "completed",
                "call_id": "call_bc0a7fb7235840f69ecfe4",
                "name": "get_current_weather",
                "arguments": " {\"location\": \"杭州\"}"
            }
        ],
        "usage": {
            "total_tokens": 567,
            "input_tokens": 524,
            "output_tokens": 43,
            "input_tokens_details": {
                "text_tokens": 487,
                "audio_tokens": 37
            },
            "output_tokens_details": {
                "text_tokens": 43
            }
        }
    }
}

response.text.delta

When the output modality contains only text and the model incrementally generates new text, the server returns this event.
event_idstring
The unique identifier of this event.
typestring
Event type, fixed as response.text.delta.
deltastring
The incremental text returned.
response_idstring
The ID of the response.
item_idstring
The message item ID, which can be used to correlate the same message item.
output_indexinteger
The index of the output item in the response, currently fixed at 0.
content_indexinteger
The index of the internal part within the output item in the response, currently fixed at 0.
{
    "delta": "喂",
    "event_id": "event_TH49MauuPmRo1RGaMSlP7",
    "type": "response.text.delta",
    "response_id": "resp_PrRSvPVpnCExdUOGHHLuP",
    "item_id": "item_L8IRm9kRXFpxoOjDqDC96",
    "output_index": 0,
    "content_index": 0
}

response.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_idstring
The unique identifier of this event.
typestring
Event type, fixed as response.text.done.
response_idstring
The ID of the response.
item_idstring
The message item ID.
output_indexinteger
The index of the response output item.
content_indexinteger
The index of the response output item.
textstring
The complete text generated by the model.
{
  "event_id": "event_B1lIeE2Nac33zn5V7h2mm",
  "type": "response.text.done",
  "response_id": "resp_B1lIdtjF4Noqpn5NOjznj",
  "item_id": "item_B1lIdJsAJlJiFs8ztWpJt",
  "output_index": 0,
  "content_index": 0,
  "text": "How can I assist you today?"
}

response.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_idstring
The unique identifier of this event.
typestring
Event type, fixed as response.audio.delta.
response_idstring
The ID of the response.
item_idstring
The message item ID.
output_indexinteger
The index of the response output item.
content_indexinteger
The index of the response output item.
deltastring
The audio data incrementally generated by the model, encoded in Base64.
{
  "event_id": "event_B1osWMZBtrEQbiIwW0qHQ",
  "type": "response.audio.delta",
  "response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
  "item_id": "item_OFaPGtzfWCPyGzxnuEX9i",
  "output_index": 0,
  "content_index": 0,
  "delta": "{base64 audio}"
}

response.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_idstring
The unique identifier of this event.
typestring
Event type, fixed as response.audio.done.
response_idstring
The ID of the response.
item_idstring
The message item ID.
output_indexinteger
The index of the response output item.
content_indexinteger
The index of the response output item.
{
    "event_id": "event_Le1TDl7VfyHQxl47DtGxI",
    "type": "response.audio.done",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "item_id": "item_Ls6MtCUWO7LM4E59QziNv",
    "output_index": 0,
    "content_index": 0
}

response.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_idstring
The unique identifier of this event.
typestring
Event type, fixed as response.audio_transcript.delta.
response_idstring
The ID of the response.
item_idstring
The message item ID.
output_indexinteger
The index of the response output item.
content_indexinteger
The index of the response output item.
deltastring
Incremental text.
{
    "event_id": "event_BksW7fOwnyavZdDxIzZYM",
    "type": "response.audio_transcript.delta",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "item_id": "item_Ls6MtCUWO7LM4E59QziNv",
    "output_index": 0,
    "content_index": 0,
    "delta": "有什么"
}

response.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_idstring
The unique identifier of this event.
typestring
Event type, fixed as response.audio_transcript.done.
response_idstring
The ID of the response.
item_idstring
The message item ID.
output_indexinteger
The index of the response output item.
content_indexinteger
The index of the response output item.
transcriptstring
The complete text.
{
    "event_id": "event_X49tL2WerT4WjxcmH16lS",
    "type": "response.audio_transcript.done",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "item_id": "item_Ls6MtCUWO7LM4E59QziNv",
    "output_index": 0,
    "content_index": 0,
    "transcript": "你好呀!有什么我可以帮你的吗?"
}

response.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_idstring
The unique identifier of this event.
typestring
The event type, fixed as response.function_call_arguments.delta.
response_idstring
The ID of the response.
item_idstring
The message item ID.
output_indexinteger
The index of the output item in this response.
call_idstring
The unique ID of this function call, consistent with the done event in the same turn.
deltastring
The new argument string fragment added in this chunk (increment). Fragments must be concatenated in order.
{
    "event_id": "event_SlKoJyEbPEqLq14DSM1u5",
    "type": "response.function_call_arguments.delta",
    "response_id": "resp_JnTOsWXlFhKcFohZbtfz6",
    "item_id": "item_Rhcms7CauTNsQprV5S4Hr",
    "output_index": 0,
    "call_id": "call_2be200f4cafe419b9530dd",
    "delta": " {\"location\": \"北京\"}"
}

response.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_idstring
The unique identifier of this event.
typestring
The event type, fixed as response.function_call_arguments.done.
response_idstring
The ID of the response.
item_idstring
The message item ID.
output_indexinteger
The index of the output item in this response.
call_idstring
The unique ID of this function call.
namestring
The name of the function being called.
argumentsstring
The complete arguments of the function call, typically represented as a JSON string.
{
    "event_id": "event_X6suLyuL5agdH7r6koesM",
    "type": "response.function_call_arguments.done",
    "response_id": "resp_JnTOsWXlFhKcFohZbtfz6",
    "item_id": "item_Rhcms7CauTNsQprV5S4Hr",
    "output_index": 0,
    "name": "get_current_weather",
    "call_id": "call_2be200f4cafe419b9530dd",
    "arguments": " {\"location\": \"北京\"}"
}

response.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_idstring
The unique identifier of this event.
typestring
The event type, fixed as response.output_item.added.
response_idstring
The ID of the response.
output_indexinteger
The index of the response output item.
itemobject
The output item information.
idstring
The unique ID of the output item.
objectstring
message and function_call items are fixed as realtime.item; if an MCP item returns this field, the value is also realtime.item.
statusstring
The status of the output item.
rolestring
Included only in message items, indicating the role of the message.
contentarray
The content of the message. Present when type is message. 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.
typestring
The type of the output item. Optional values include message (regular message) and function_call (tool calling); Qwen3.8-Omni-Flash-Realtime also supports mcp_call. For event examples, see MCP conversation items.
namestring
When type is function_call, the name of the function being called.
call_idstring
When type is function_call, the unique ID of this function call.
argumentsstring
When type is function_call, the arguments of the function call (JSON string). Initially an empty string in the added event.

type=mcp_call (initial item)

objectstring(Required)
Fixed as realtime.item.
statusstring(Required)
Initially in_progress.
server_labelstring(Required)
The identifier of the MCP Server that actually executes the tool.
namestring(Required)
The original name of the tool.
call_idstring(Required)
The unique ID of this call.
argumentsstring(Required)
Initially an empty string; the complete arguments are subject to response.mcp_call_arguments.done and the final item.
{
    "event_id": "event_DsCO341DEVtiATtCB6BUY",
    "type": "response.output_item.added",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "output_index": 0,
    "item": {
        "id": "item_Ls6MtCUWO7LM4E59QziNv",
        "object": "realtime.item",
        "type": "message",
        "status": "in_progress",
        "role": "assistant",
        "content": []
    }
}
// 工具调用场景
{
    "event_id": "event_HXmKt5pGoiRtXx7Hq7zpN",
    "type": "response.output_item.added",
    "response_id": "resp_TucN5QgymL5MA8vkJvFlS",
    "output_index": 0,
    "item": {
        "id": "item_FEG9qJGNkPcdf4et3p7BV",
        "object": "realtime.item",
        "type": "function_call",
        "status": "in_progress",
        "call_id": "call_bc0a7fb7235840f69ecfe4",
        "name": "get_current_weather",
        "arguments": ""
    }
}

response.output_item.done

The server returns this event when a new item output is completed.
event_idstring
The unique identifier of this event.
typestring
The event type, fixed as response.output_item.done.
response_idstring
The ID of the response.
output_indexinteger
The index of the response output item.
itemobject
The output item information.
idstring
The unique ID of the output item.
objectstring
message and function_call items are fixed as realtime.item; if an MCP item returns this field, the value is also realtime.item.
statusstring
The status of the output item.
rolestring
Included only in message items, indicating the role of the message.
contentarray[object]
The content of the message. Present when type is message. The following fields correspond to the array elements in the example on this page.

Array element

typestring
The type of the content fragment; it is audio in the examples on this page.
textstring
The text content in the examples on this page.
typestring
The type of the output item. Optional values include message (regular message) and function_call (tool calling); Qwen3.8-Omni-Flash-Realtime also supports mcp_call. For event examples, see MCP conversation items.
namestring
When type is function_call, the name of the function being called.
call_idstring
When type is function_call, the unique ID of this function call.
argumentsstring
When type is function_call, the complete arguments of the function call (JSON string).

type=mcp_call (final item)

statusstring(Required)
completed or failed.
server_labelstring(Required)
The identifier of the MCP Server that actually executes the tool.
namestring(Required)
The original name of the tool.
call_idstring(Required)
The unique ID of this call.
argumentsstring(Required)
The complete arguments as a JSON string.
outputstring(Optional)
The JSON string of the serialized MCP tools/call.result object; it may also appear in some failure scenarios.
errorobject(Optional)
Appears when the call fails.
typestring(Required)
Fixed as tool_execution_error.
messagestring(Required)
A safe, client-facing description of the error, excluding sensitive upstream response bodies.
When the MCP Server returns isError=true, the final status is failed, and the original output may also be retained.
{
    "event_id": "event_MEu5nlLw1LsOguHiehIP8",
    "type": "response.output_item.done",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "output_index": 0,
    "item": {
        "id": "item_Ls6MtCUWO7LM4E59QziNv",
        "object": "realtime.item",
        "type": "message",
        "status": "completed",
        "role": "assistant",
        "content": [
            {
                "type": "audio",
                "text": "你好呀!有什么我可以帮你的吗?"
            }
        ]
    }
}
// 工具调用场景
{
    "event_id": "event_FHspdfAnCyjuME3mmAwSY",
    "type": "response.output_item.done",
    "response_id": "resp_TucN5QgymL5MA8vkJvFlS",
    "output_index": 0,
    "item": {
        "id": "item_FEG9qJGNkPcdf4et3p7BV",
        "object": "realtime.item",
        "type": "function_call",
        "status": "completed",
        "call_id": "call_bc0a7fb7235840f69ecfe4",
        "name": "get_current_weather",
        "arguments": " {\"location\": \"杭州\"}"
    }
}

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_idstring
The unique identifier of this event.
typestring
The event type, fixed as response.content_part.added.
response_idstring
The ID of the response.
item_idstring
The message item ID.
output_indexinteger
The index of the response output item, currently fixed at 0.
content_indexinteger
The index of the internal part within the response output item, currently fixed at 0.
partobject
The output item information.
typestring
The type of the content part.
textstring
The text of the content part.
{
    "event_id": "event_AVBOmrgY3C8bjlRajfSUT",
    "type": "response.content_part.added",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "item_id": "item_Ls6MtCUWO7LM4E59QziNv",
    "output_index": 0,
    "content_index": 0,
    "part": {
        "type": "audio",
        "text": ""
    }
}

response.content_part.done

The server returns this event when a content part in the assistant message item finishes streaming.
event_idstring
The unique identifier of this event.
typestring
The event type, fixed as response.content_part.done.
response_idstring
The ID of the response.
item_idstring
The message item ID.
output_indexinteger
The index of the response output item, currently fixed at 0.
content_indexinteger
The index of the content part within the content array of this item; currently fixed at 0.
partobject
The output item information.
typestring
The type of the content part.
textstring
The text of the content part.
{
    "event_id": "event_Il8HD19v58Qr5IBkw7LtN",
    "type": "response.content_part.done",
    "response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
    "item_id": "item_Ls6MtCUWO7LM4E59QziNv",
    "output_index": 0,
    "content_index": 0,
    "part": {
        "type": "audio",
        "text": "你好呀!有什么我可以帮你的吗?"
    }
}

MCP 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 typeTriggered when
mcp_list_tools.in_progressTool discovery for an MCP Server starts
mcp_list_tools.completedTool discovery succeeds and allowed_tools filtering is complete
mcp_list_tools.failedTool discovery fails, times out, or the result exceeds the service limit
event_idstring(Required)
The unique ID of this server event
typestring(Required)
The fixed event type listed in the table above
item_idstring(Required)
The mcp_list_tools item ID corresponding to this tool discovery
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:
{
  "event_id": "opaque_event_id",
  "type": "mcp_list_tools.completed",
  "item_id": "opaque_item_id"
}

response.mcp_call_arguments.delta

event_idstring(Required)
The unique ID of this server event
typestring(Required)
Fixed as response.mcp_call_arguments.delta
response_idstring(Required)
Parent Response ID
item_idstring(Required)
The current mcp_call item ID
output_indexinteger(Required)
The zero-based index of the current item in the parent Response output array
deltastring(Required)
The incremental fragment of the tool-arguments JSON string delivered by this event; concatenate fragments in event order
obfuscationstring(Optional)
Optional obfuscation string; the client can ignore it, as it does not affect delta concatenation or argument parsing
Examples:
{
  "event_id": "opaque_event_id",
  "type": "response.mcp_call_arguments.delta",
  "response_id": "opaque_response_id",
  "item_id": "opaque_item_id",
  "output_index": 0,
  "delta": "{\"city\":\"杭",
  "obfuscation": "opaque-value"
}

response.mcp_call_arguments.done

event_idstring(Required)
The unique ID of this server event
typestring(Required)
Fixed as response.mcp_call_arguments.done
response_idstring(Required)
Parent Response ID
item_idstring(Required)
The current mcp_call item ID
output_indexinteger(Required)
The zero-based index of the current item in the parent Response output array
argumentsstring(Required)
The complete tool arguments, provided as a JSON string; the client should treat this field as authoritative
Examples:
{
  "event_id": "opaque_event_id",
  "type": "response.mcp_call_arguments.done",
  "response_id": "opaque_response_id",
  "item_id": "opaque_item_id",
  "output_index": 0,
  "arguments": "{\"city\":\"杭州\"}"
}

response.mcp_call.*

Event typeTriggered when
response.mcp_call.in_progressArgument generation is complete and the call is approved or requires no approval; the MCP Server call starts
response.mcp_call.completedThe MCP tool call succeeds
response.mcp_call.failedConnection, protocol, or tool business errors; approval rejection, approval timeout, call timeout, or cancellation
All three events use the following fields:
event_idstring(Required)
The unique ID of this server event
typestring(Required)
The fixed event type listed in the table above
item_idstring(Required)
The current mcp_call item ID
output_indexinteger(Required)
The zero-based index of the current item in the parent Response output array
Examples:
{
  "event_id": "opaque_event_id",
  "type": "response.mcp_call.in_progress",
  "item_id": "opaque_item_id",
  "output_index": 0
}

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:
{
  "event_id": "opaque_event_id",
  "type": "conversation.item.created",
  "item": {
    "id": "opaque_item_id",
    "type": "mcp_list_tools",
    "server_label": "amap",
    "tools": [
      {
        "name": "maps_weather",
        "description": "查询天气",
        "input_schema": {
          "type": "object",
          "properties": {
            "city": {
              "type": "string",
              "description": "城市名"
            }
          },
          "required": ["city"]
        }
      }
    ]
  }
}

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:
{
  "event_id": "opaque_event_id",
  "type": "response.output_item.added",
  "response_id": "opaque_response_id",
  "output_index": 0,
  "item": {
    "id": "opaque_item_id",
    "object": "realtime.item",
    "type": "mcp_call",
    "status": "in_progress",
    "call_id": "opaque_call_id",
    "server_label": "amap",
    "name": "maps_weather",
    "arguments": ""
  }
}

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:
{
  "event_id": "opaque_event_id",
  "type": "conversation.item.created",
  "response_id": "opaque_response_id",
  "item_id": "opaque_approval_id",
  "previous_item_id": "opaque_item_id",
  "item": {
    "id": "opaque_approval_id",
    "type": "mcp_approval_request",
    "server_label": "amap",
    "name": "maps_weather",
    "arguments": "{\"city\":\"杭州\"}",
    "call_id": "opaque_call_id"
  }
}

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
Success example:
{
  "event_id": "opaque_event_id",
  "type": "response.output_item.done",
  "response_id": "opaque_response_id",
  "output_index": 0,
  "item": {
    "id": "opaque_item_id",
    "type": "mcp_call",
    "status": "completed",
    "call_id": "opaque_call_id",
    "server_label": "amap",
    "name": "maps_weather",
    "arguments": "{\"city\":\"杭州\"}",
    "output": "{\"content\":[{\"type\":\"text\",\"text\":\"...\"}],\"isError\":false}"
  }
}

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).