Server events for the Qwen-Omni-Realtime API, including tool calling (function calling) events.
error
Server error.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always error. |
| error | object | Error details. |
| error.type | string | The error type. |
| error.code | string | The error code. |
| error.message | string | The error message. |
| error.param | string | The parameter associated with the error, such as session.modalities. |
session.created
Returned when a client connects. Contains the default session configuration.
The following example is the default session returned by qwen3.8-omni-flash-realtime in the China North 2 (Beijing) region.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always session.created. |
| session | object | The session configuration. |
| session.object | string | This value is always realtime.session. |
| session.model | string | The model used. |
| session.modalities | array | The output modalities for the model. |
| session.voice | string | The voice for model-generated audio. |
| session.input_audio_format | string | Input audio format. Only pcm is supported (16 kHz sample rate). |
| session.output_audio_format | string | Output audio format. Only pcm is supported (24 kHz sample rate). |
| session.input_audio_transcription | object | The transcription configuration. |
| session.input_audio_transcription.model | string | Transcription model. Always qwen3-asr-flash-realtime. Not configurable. |
| session.turn_detection | object | The voice activity detection (VAD) configuration. |
| session.turn_detection.type | string | The VAD type. Valid values are server_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. |
| session.turn_detection.threshold | float | The VAD detection threshold. |
| session.turn_detection.silence_duration_ms | integer | Silence duration (ms) that triggers end-of-speech detection. |
| session.turn_detection.idle_timeout_ms | integer | The idle timeout in milliseconds. Returned only in server_vad mode with qwen3.5-omni-plus-realtime or qwen3.5-omni-flash-realtime models. |
| session.enable_search | boolean | Whether to enable web search. Supported by Qwen3.8-Omni-Flash-Realtime and Qwen3.5-Omni-Realtime models. |
| session.search_options | object | The options for the web search. |
| session.temperature | float | The temperature parameter for the model. |
session.updated
Returned after a successful session.update request. On failure, an error event is returned instead.
The following example uses qwen3.8-omni-flash-realtime in the China North 2 (Beijing) region, with text-only output and max_tokens=32.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always session.updated. |
| session | object | The session configuration. |
| session.temperature | float | The temperature parameter for the model. |
| session.modalities | array | The output modalities for the model. |
| session.voice | string | The voice for model-generated audio. |
| session.instructions | string | The model's goal and role. |
| session.input_audio_format | string | Input audio format. Only pcm is supported (16 kHz sample rate). |
| session.output_audio_format | string | Output audio format. Only pcm is supported (24 kHz sample rate). |
| session.input_audio_transcription | object | The transcription configuration. |
| session.input_audio_transcription.model | string | Transcription model. Always qwen3-asr-flash-realtime. Not configurable. |
| session.turn_detection | object | The voice activity detection (VAD) configuration. |
| session.turn_detection.type | string | The VAD type. Valid values are server_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. |
| session.turn_detection.threshold | float | The VAD detection threshold. |
| session.turn_detection.silence_duration_ms | integer | Silence duration (ms) that triggers end-of-speech detection. |
| session.turn_detection.idle_timeout_ms | integer | The idle timeout in milliseconds. Returned only in server_vad mode with qwen3.5-omni-plus-realtime or qwen3.5-omni-flash-realtime models. |
| session.enable_search | boolean | (optional) Whether to enable web search. Supported by Qwen3.8-Omni-Flash-Realtime and Qwen3.5-Omni-Realtime models. |
| session.search_options | object | (optional) The web search options. |
| session.tools | array | (optional) Tool definitions. The properties below describe Function Calling tools with type="function". See client tool configuration for Qwen3.8-Omni-Flash-Realtime MCP fields; MCP endpoints and credentials are not echoed in session.updated. |
| session.tools.type | string | (required) This value is always function. |
| session.tools.function.name | string | (required) The function name, such as get_current_weather or get_current_time. |
| session.tools.function.description | string | (optional) Description of the function's purpose. The model uses this to decide whether to call the function. |
| session.tools.function.parameters | object | (optional) Input parameter schema. The model uses this to extract parameters. Omit if the function takes no parameters. |
| session.tools.function.parameters.type | string | (required) This value is always object. |
| session.tools.function.parameters.properties | object | (optional) Each key is a parameter name mapped to an object with type and description. |
| session.tools.function.parameters.required | array | (optional) Specifies which input parameters are required. |
| session.top_p | float | The probability threshold for nucleus sampling. |
| session.top_k | integer | Candidate set size for sampling during generation. |
| session.max_tokens | integer | Maximum tokens the model can return for this request. |
| session.repetition_penalty | float | Controls repetition in consecutive sequences during generation. |
| session.presence_penalty | float | Controls repetition in generated content. |
| session.seed | integer | The degree of consistency in the model's output per request. |
input_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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always input_audio_buffer.speech_started. |
| audio_start_ms | integer | Time (ms) from when audio buffer writing starts until speech is first detected. |
| item_id | string | ID of the user message item created when end-of-speech is detected. > User 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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always input_audio_buffer.speech_stopped. |
| audio_end_ms | integer | Time (ms) from session start until end-of-speech is detected. |
| item_id | string | The ID of the user message item that will be created. |
input_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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always input_audio_buffer.committed. |
| item_id | string | The ID of the user message item that will be created. |
input_audio_buffer.cleared
Returned after the client sends an input_audio_buffer.clear event.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always input_audio_buffer.cleared. |
conversation.item.created
Returned when a conversation item is created.
Example:
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always conversation.item.created. |
| response_id | string | (conditionally required) Returned only when item.type is mcp_approval_request; identifies the parent Response that generated the MCP call. |
| item_id | string | (conditionally required) Returned only when item.type is mcp_approval_request; the approval item ID, equal to item.id. |
| previous_item_id | string | (conditionally required) Returned only when item.type is mcp_approval_request; identifies the mcp_call item under review. |
| item | object | The conversation item to add. |
| item.id | string | The unique ID of the conversation item. |
| item.object | string | For message and function_call items, this field is realtime.item. For MCP items, it has the same value when returned. |
| item.status | string | When returned, this field indicates the conversation item status. An initial mcp_call item requires it with the value in_progress. |
| item.role | string | Present only on message items; identifies the message role. |
| item.content | array of objects | The content of the message, returned when the type is message. The following fields describe the array element in this example. |
| item.content.type | string | The content-part type; input_audio in this example. |
| item.type | string | The conversation item type includes message and function_call. Qwen3.8-Omni-Flash-Realtime also returns mcp_list_tools, mcp_call, and mcp_approval_request; see MCP item examples. |
| item.name | string | The name of the function that is called when the type is function_call. |
| item.call_id | string | When the type is function_call, this is the unique ID of the function invocation. |
| item.arguments | string | When the type is function_call, this parameter contains the arguments for the function invocation as a JSON string. |
item.id matches the item_id in tool discovery status events.
| Parameter | Type | Description |
|---|---|---|
| item.server_label | string | (required) Identifies the MCP server. |
| item.tools | array of objects | (required) Validated tool definitions after allowed_tools filtering; empty if discovery fails. |
| item.tools.name | string | (required) Original tool name, 1–64 characters using letters, digits, underscores, periods, or hyphens. |
| item.tools.description | string | (optional) Tool description from the MCP server. |
| item.tools.input_schema | object | (required) JSON Schema from the MCP server. The service does not perform full JSON Schema semantic validation; the MCP server ultimately validates arguments. |
| item.tools.input_schema.type | string | (required) The root value must be object. |
| item.tools.input_schema.properties | object | (optional) List each parameter under its custom name. For example, 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. |
| item.tools.input_schema.required | array of strings | (optional) Names of required parameters. Other standard JSON Schema fields, including additionalProperties, $defs, oneOf, anyOf, and allOf, pass through from the original schema. |
| item.tools.annotations | object | (optional) ToolAnnotations from the MCP server. The following MCP standard hint fields are optional; the server determines which fields it returns. |
| item.tools.annotations.title | string | (optional) Display name of the tool. |
| item.tools.annotations.readOnlyHint | boolean | (optional) Hints whether the tool is read-only. |
| item.tools.annotations.destructiveHint | boolean | (optional) Hints whether the tool may make destructive changes. |
| item.tools.annotations.idempotentHint | boolean | (optional) Hints whether repeated calls have no additional effect. |
| item.tools.annotations.openWorldHint | boolean | (optional) Hints whether the tool may interact with external systems. These fields are hints and must not be used as a security guarantee. |
| item.error | object | (optional) Returned on discovery failure. |
| item.error.type | string | (required) Must be tool_execution_error. |
| item.error.message | string | (required) A client-safe description without sensitive upstream response content. |
| Parameter | Type | Description |
|---|---|---|
| item.object | string | (required) Must be realtime.item. |
| item.status | string | (required) Initially in_progress. |
| item.server_label | string | (required) Identifies the MCP server executing the tool. |
| item.name | string | (required) Original tool name. |
| item.call_id | string | (required) Unique ID of this call. |
| item.arguments | string | (required) Usually empty initially; use later events and the final item for full arguments. |
item.id unchanged into approval_request_id when replying.
| Parameter | Type | Description |
|---|---|---|
| item.server_label | string | (required) Identifies the MCP server for the pending tool. |
| item.name | string | (required) Original name of the pending tool. |
| item.arguments | string | (required) Full JSON string of arguments awaiting approval. |
| item.call_id | string | (required) ID of the call awaiting approval. |
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.
text + stash. Suppose the user is saying: "The weather is nice today, sunny and warm." The following shows the event stream you might receive and how to interpret them: 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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always conversation.item.input_audio_transcription.delta. |
| item_id | string | The ID of the associated conversation item. |
| content_index | integer | The index of the content part that contains the audio. |
| text | string | Confirmed text prefix — the portion the model has finalized and will not change. |
| stash | string | Preliminary text suffix — a temporary draft following the confirmed portion, subject to revision. |
| language | string | The detected language of the recognized audio. |
| emotion | string | The detected emotion of the recognized audio. Valid values: neutral, happy, sad, angry, surprised, disgusted, fearful. |
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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always conversation.item.input_audio_transcription.completed. |
| item_id | string | The ID of the user message item. |
| content_index | integer | This value is always 0. |
| transcript | string | The transcribed text. |
conversation.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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always conversation.item.input_audio_transcription.failed. |
| item_id | string | The ID of the user message item. |
| content_index | integer | This value is always 0. |
| error | object | The error information. |
| error.code | string | The error code. |
| error.message | string | The error message. |
| error.param | string | The parameter related to the error. |
response.created
Returned when the server starts generating a new response.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.created. |
| response | object | The response object. |
| response.id | string | The unique ID of the response. |
| response.conversation_id | string | The unique ID of the current session. |
| response.object | string | The object type. For this event, this value is always realtime.response. |
| response.status | string | The response status. Valid values are completed, failed, in_progress, or incomplete. |
| response.modalities | array | The response modalities. |
| response.voice | string | The voice for model-generated audio. |
| response.output | array | This field is empty for this event. |
response.done
Returned after the response is fully generated. The response object includes all output items except raw audio data.
Example:
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.done. |
| response | object | The response object. |
| response.id | string | The unique ID of the response. |
| response.conversation_id | string | The unique ID of the current session. |
| response.object | string | The object type. For this event, this value is always realtime.response. |
| response.status | string | The response status. |
| response.modalities | array | The response modalities. |
| response.voice | string | The voice for model-generated audio. |
| response.output | array | The response output items. Each array element is a conversation item object. |
| response.output.id | string | The ID of the response output. |
| response.output.type | string | The type of the output item. Values include message and function_call. Qwen3.8-Omni-Flash-Realtime also supports mcp_call; see MCP item examples. |
| response.output.object | string | For message and function_call items, this field is realtime.item. For MCP items, it has the same value when returned. |
| response.output.status | string | The output item status. |
| response.output.role | string | Present only on message items; identifies the message role. |
| response.output.content | array | The output item content, returned only when type is message. Each array element is a content-part object. |
| response.output.content.type | string | The content type. The value can be text for plain text output or audio for audio output. |
| response.output.content.text | string | The text output. |
| response.output.content.transcript | string | The text transcript of the audio. |
| response.output.name | string | The name of the function that is invoked when the type is function_call. |
| response.output.call_id | string | When the type is function_call, this is the unique ID of the function invocation. |
| response.output.arguments | string | When the type is function_call, this field contains the full arguments for the function call as a JSON string. |
| Parameter | Type | Description |
|---|---|---|
| response.output.status | string | (required) completed or failed. |
| response.output.server_label | string | (required) Identifies the MCP server that executed the tool. |
| response.output.name | string | (required) Original tool name. |
| response.output.call_id | string | (required) Unique ID of this call. |
| response.output.arguments | string | (required) Full JSON string of arguments. |
| response.output | string | (optional) A JSON string serialized from MCP tools/call.result. It may also appear in some failure cases. |
| response.output.error | object | (optional) Returned on failure. |
| response.output.error.type | string | (required) Must be tool_execution_error. |
| response.output.error.message | string | (required) A client-safe description without sensitive upstream response content. If the MCP server returns isError=true, the final status is failed and the original output may also be present. |
| Parameter | Type | Description |
|---|---|---|
| response.usage | object | Token usage details for this response. |
| response.usage.total_tokens | integer | Total tokens used in this response. |
| response.usage.input_tokens | integer | Number of input tokens. |
| response.usage.output_tokens | integer | Number of output tokens. |
| response.usage.input_tokens_details | object | Details about input token usage, including text_tokens and audio_tokens. |
| response.usage.output_tokens_details | object | Details about output token usage, including text_tokens and audio_tokens. |
| response.usage.plugins | object | (optional) Plugin usage metrics. Returned when web search (enable_search) is enabled. |
| response.usage.plugins.search | object | Search metering data. |
| response.usage.plugins.search.count | integer | The number of searches. |
| response.usage.plugins.search.strategy | string | The search strategy. |
response.text.delta
Returned when the output modality is text-only and the model generates new text incrementally.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.text.delta. |
| delta | string | Incremental text generated by the model. |
| response_id | string | The response ID. |
| item_id | string | The message item ID. |
| output_index | integer | The index of the output item in the response. This value is always 0. |
| content_index | integer | The index of the internal part within the output item. This value is always 0. |
response.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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.text.done. |
| response_id | string | The response ID. |
| item_id | string | The message item ID. |
| output_index | integer | The index of the output item in the response. |
| content_index | integer | The index of the output item in the response. |
| text | string | The full text generated by the model. |
response.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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.audio.delta. |
| response_id | string | The response ID. |
| item_id | string | The message item ID. |
| output_index | integer | The index of the output item in the response. |
| content_index | integer | The index of the output item in the response. |
| delta | string | Incremental audio data, Base64-encoded. |
response.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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.audio.done. |
| response_id | string | The response ID. |
| item_id | string | The message item ID. |
| output_index | integer | The index of the output item in the response. |
| content_index | integer | The index of the output item in the response. |
response.audio_transcript.delta
Returned when the output modality includes audio and the model generates new response.audio_transcript.delta transcript text incrementally.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.audio_transcript.delta. |
| response_id | string | The response ID. |
| item_id | string | The message item ID. |
| output_index | integer | The index of the output item in the response. |
| content_index | integer | The index of the output item in the response. |
| delta | string | The incremental text. |
response.audio_transcript.done
Returned as a response.audio_transcript.done event when the output modality includes audio and the model completes the audio transcript.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.audio_transcript.done. |
| response_id | string | The response ID. |
| item_id | string | The message item ID. |
| output_index | integer | The index of the output item in the response. |
| content_index | integer | The index of the output item in the response. |
| transcript | string | The full transcription text. |
response.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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.function_call_arguments.delta. |
| response_id | string | The response ID. |
| item_id | string | The message item ID. |
| output_index | integer | The index of the output item in the response. |
| call_id | string | The unique ID for this function invocation. This is consistent with the done event in the same turn. |
| delta | string | New segment of the argument string. Concatenate segments in order. |
response.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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.function_call_arguments.done. |
| response_id | string | The response ID. |
| item_id | string | The message item ID. |
| output_index | integer | The index of the output item in the response. |
| call_id | string | The unique ID for this function invocation. |
| name | string | The name of the function that was called. |
| arguments | string | Complete function call arguments as a JSON string. |
response.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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.output_item.added. |
| response_id | string | The response ID. |
| output_index | integer | The index of the output item in the response. |
| item | object | Information about the output item. |
| item.id | string | The unique ID of the output item. |
| item.object | string | For message and function_call items, this field is realtime.item. For MCP items, it has the same value when returned. |
| item.status | string | The status of the output item. |
| item.role | string | Present only on message items; identifies the message role. |
| item.content | array | The content of the message, returned when the type is message. The array is initially empty in this example; see the completed item in the response.output_item.done example. |
| item.type | string | The type of the output item. Values include message and function_call. Qwen3.8-Omni-Flash-Realtime also supports mcp_call; see MCP item examples. |
| item.name | string | The name of the function to call when the type is function_call. |
| item.call_id | string | The unique ID of the current function invocation when the type is function_call. |
| item.arguments | string | Function call arguments as a JSON string when the type is function_call. Initially an empty string in added events. |
| Parameter | Type | Description |
|---|---|---|
| item.object | string | (required) Must be realtime.item. |
| item.status | string | (required) Initially in_progress. |
| item.server_label | string | (required) Identifies the MCP server executing the tool. |
| item.name | string | (required) Original tool name. |
| item.call_id | string | (required) Unique ID of this call. |
| item.arguments | string | (required) Usually empty initially; use response.mcp_call_arguments.done and the final item for full arguments. |
response.output_item.done
Returned when an output item is fully generated.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.output_item.done. |
| response_id | string | The response ID. |
| output_index | integer | The index of the output item in the response. |
| item | object | The output item information. |
| item.id | string | The unique ID of the output item. |
| item.object | string | For message and function_call items, this field is realtime.item. For MCP items, it has the same value when returned. |
| item.status | string | The status of the output item. |
| item.role | string | Present only on message items; identifies the message role. |
| item.content | array of objects | The content of the message, returned when the type is message. The following fields describe the array element in this example. |
| item.content.type | string | The content-part type; audio in this example. |
| item.content.text | string | Text content in this example. |
| item.type | string | The type of the output item. Values include message and function_call. Qwen3.8-Omni-Flash-Realtime also supports mcp_call; see MCP item examples. |
| item.name | string | The name of the function that is called when the type is function_call. |
| item.call_id | string | When the type is function_call, this is the unique ID for the function invocation. |
| item.arguments | string | When the type is function_call, contains the full function call arguments as a JSON string. |
| Parameter | Type | Description |
|---|---|---|
| item.status | string | (required) completed or failed. |
| item.server_label | string | (required) Identifies the MCP server that executed the tool. |
| item.name | string | (required) Original tool name. |
| item.call_id | string | (required) Unique ID of this call. |
| item.arguments | string | (required) Full JSON string of arguments. |
| item.output | string | (optional) A JSON string serialized from MCP tools/call.result. It may also appear in some failure cases. |
| item.error | object | (optional) Returned on failure. |
| item.error.type | string | (required) Must be tool_execution_error. |
| item.error.message | string | (required) A client-safe description without sensitive upstream response content. If the MCP server returns 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.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.content_part.added. |
| response_id | string | The response ID. |
| item_id | string | The message item ID. |
| output_index | integer | The index of the output item in the response. This value is always 0. |
| content_index | integer | The index of the internal part within the output item. This value is always 0. |
| part | object | The output item information. |
| part.type | string | The type of the content part. |
| part.text | string | The text of the content part. |
response.content_part.done
Returned when streaming of a content part within an assistant message item finishes.
| Parameter | Type | Description |
|---|---|---|
| event_id | string | A unique identifier for this event. |
| type | string | The event type. This value is always response.content_part.done. |
| response_id | string | The response ID. |
| item_id | string | The message item ID. |
| output_index | integer | The index of the output item in the response. This value is always 0. |
| content_index | integer | The index of the content part in the content array. This value is always 0. |
| part | object | The output item information. |
| part.type | string | The type of the content part. |
| part.text | string | The text of the content part. |
MCP 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_id (unique event ID), type (event type above), and item_id (associated 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
| Field | Type | Required | Meaning |
|---|---|---|---|
event_id | string | Yes | Unique event ID. |
type | string | Yes | response.mcp_call_arguments.delta |
response_id | string | Yes | Parent Response ID. |
item_id | string | Yes | Current mcp_call item ID. |
output_index | integer | Yes | Zero-based index in the parent Response output array. |
delta | string | Yes | Incremental JSON-string fragment; concatenate in event order. |
obfuscation | string | No | Optional obfuscation string; ignore when assembling and parsing arguments. |
response.mcp_call_arguments.done
Requires event_id, type, response_id, and item_id (strings), output_index (integer, same meaning as above), and arguments (string). type is response.mcp_call_arguments.done. arguments contains the complete JSON-encoded arguments and is authoritative.
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_id, type, and item_id (strings), and output_index (integer). item_id identifies the current mcp_call; output_index is its index in the parent Response output array.
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.
Successful call:
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.