Skip to main content

server-events

Server event reference for the Qwen-Audio Realtime API. All server events include the common fields event_id (automatically generated by the server) and type (event type).

User guide: Real-time voice conversations (Qwen-Audio-Realtime). For event interaction sequences, see WebSocket API.

error​

Description: Returned for request errors or service failures. Client errors (invalid_request_error) do not interrupt the connection; server errors (server_error) terminate it.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "error", "error": { "type": "invalid_request_error", "code": "invalid_value", "message": "Cannot create response while another response is in progress.", "param": "response.create" } }
type *string* Event type, fixed to error.
error *object* Error details. Properties type *string* Error type, such as invalid_request_error (client error) or server_error (server error). code *string* Error code. message *string* Error message. param *string* Parameter associated with the error.

session.created​

Description: The first event sent by the server after the connection is established. Contains the default session configuration.

event\_id *string* Unique identifier of this event.{ "event_id": "event_KiKZC2zrhNsKFPZ5cTpyA", "type": "session.created", "session": { "object": "realtime.session", "model": "qwen-audio-3.0-realtime-plus", "modalities": ["text", "audio"], "voice": "longanqian", "input_audio_transcription": { "model": "fun-asr" }, "turn_detection": { "type": "server_vad", "threshold": 0.5, "silence_duration_ms": 800 }, "id": "sess_A1LbG2D63WELBSawRbpq8" } }
type *string* Event type, fixed to session.created.
session *object* Session configuration. Properties object *string* Fixed to realtime.session. model *string* Model name. modalities *array* Model output modalities. voice *string* Voice for model-generated audio: a system voice name or the voice_id of a cloned voice. input\_audio\_transcription *object* Audio transcription configuration. Properties model *string* Audio transcription model, such as fun-asr. turn\_detection *object* Turn detection (VAD) configuration. id *string* Unique session identifier.

session.updated​

Description: Returned after a session.update request is processed successfully, containing the complete updated session configuration. On failure, an error event is returned instead.

event\_id *string* Unique identifier of this event.{ "event_id": "event_FMG6kiHbILCGiqXFPA98e", "type": "session.updated", "session": { "id": "sess_A1LbG2D63WELBSawRbpq8", "object": "realtime.session", "model": "pre-fun-realtime-audiochat-beta-3", "modalities": ["text", "audio"], "voice": "longanqian", "input_audio_transcription": { "model": "fun-asr" }, "turn_detection": { "type": "smart_turn", "threshold": 0.1, "silence_duration_ms": 900 } } }
type *string* Event type, fixed to session.updated.
session *object* Complete updated session configuration. Uses the same structure as the session object in session.created.

input_audio_buffer.speech_started​

Description: VAD detected speech start (server_vad / smart_turn mode).

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "input_audio_buffer.speech_started", "audio_start_ms": 1200, "item_id": "item_xxx" }
type *string* Event type, fixed to input_audio_buffer.speech_started.
audio\_start\_ms *integer* Speech start timestamp in milliseconds.
item\_id *string* ID of the item to be created when this speech segment is committed.

input_audio_buffer.speech_stopped​

Description: VAD detected speech end (server_vad / smart_turn mode).

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "input_audio_buffer.speech_stopped", "audio_end_ms": 3400, "item_id": "item_xxx", "reason": "turn_invalid" }
type *string* Event type, fixed to input_audio_buffer.speech_stopped.
audio\_end\_ms *integer* Speech end timestamp in milliseconds.
item\_id *string* ID of the user message item to be created.
reason *string* Returned only in smart\_turn mode. A value of turn_invalid indicates that the current turn was deemed invalid (no semantic content) and will not trigger inference. Omitted for valid turns.

input_audio_buffer.committed​

Description: The audio buffer has been committed as a user message (a push-to-talk commit or automatic VAD commit).

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "input_audio_buffer.committed", "previous_item_id": "item_xxx", "item_id": "item_xxx" }
type *string* Event type, fixed to input_audio_buffer.committed.
previous\_item\_id *string* ID of the preceding conversation item.
item\_id *string* ID of the created user message item.

input_audio_buffer.cleared​

Description: The audio buffer has been cleared (push-to-talk mode only).

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "input_audio_buffer.cleared" }
type *string* Event type, fixed to input_audio_buffer.cleared.

conversation.item.created​

Description: A new conversation item was created successfully. Triggered when user audio is committed, the client manually creates an item, or an assistant response begins.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "conversation.item.created", "previous_item_id": "item_xxx", "item": { "id": "item_xxx", "object": "realtime.item", "type": "message", "status": "in_progress", "role": "assistant", "content": [] } }
type *string* Event type, fixed to conversation.item.created.
previous\_item\_id *string* ID of the preceding conversation item.
item *object* Created conversation item. Properties id *string* Unique conversation item identifier. object *string* Fixed to realtime.item. type *string* Conversation item type: message (regular message) or function_call (function call). status *string* Conversation item status, such as in_progress or completed. role *string* Message role, such as user or assistant. Present only for message items. content *array* List of message content elements. Present only for message items.

conversation.item.deleted​

Description: The conversation item has been deleted. This acknowledgment event is returned after the client sends conversation.item.delete.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "conversation.item.deleted", "item_id": "item_xxx" }
type *string* Event type, fixed to conversation.item.deleted.
item\_id *string* ID of the deleted conversation item.

conversation.item.retrieved​

Description: A conversation item was retrieved successfully. Returned after the client sends conversation.item.retrieve. Audio content contains only transcription text, not raw audio data.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "conversation.item.retrieved", "item": { "id": "item_xxx", "object": "realtime.item", "type": "message", "role": "user", "content": [ { "type": "input_audio", "transcript": "你好" } ] } }
type *string* Event type, fixed to conversation.item.retrieved.
item *object* Complete retrieved conversation item. Properties id *string* Unique conversation item identifier. object *string* Fixed to realtime.item. type *string* Conversation item type: message (regular message) or function_call (function call). role *string* Message role, such as user or assistant. Present only for message items. content *array* List of message content elements. Audio content contains only transcription text, not raw audio data.

conversation.item.input_audio_transcription.delta​

Description: Incremental ASR transcription results streamed during speech recognition. Includes emotion and language detection information.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "conversation.item.input_audio_transcription.delta", "item_id": "item_xxx", "content_index": 0, "text": "你好", "stash": "世界" }
type *string* Event type, fixed to conversation.item.input_audio_transcription.delta.
item\_id *string* Associated conversation item ID.
content\_index *integer* Index of the content part.
text *string* Confirmed transcription text.
stash *string* Tentative text not yet confirmed.

conversation.item.input_audio_transcription.completed​

Description: Final ASR transcription result. The transcription text is written to the corresponding item's transcript field.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "conversation.item.input_audio_transcription.completed", "item_id": "item_xxx", "content_index": 0, "transcript": "你好世界" }
type *string* Event type, fixed to conversation.item.input_audio_transcription.completed.
item\_id *string* Associated conversation item ID.
content\_index *integer* Index of the content part.
transcript *string* Complete transcription text.

conversation.item.input_audio_transcription.failed​

Description: ASR transcription failed.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "conversation.item.input_audio_transcription.failed", "item_id": "item_xxx", "content_index": 0, "error": { "type": "transcription_error", "code": "transcription_failed", "message": "ASR transcription failed" } }
type *string* Event type, fixed to conversation.item.input_audio_transcription.failed.
item\_id *string* Associated conversation item ID.
content\_index *integer* Index of the content part.
error *object* Error details. Properties type *string* Error type, such as transcription_error. code *string* Error code, such as transcription_failed. message *string* Error message.

conversation.item.ambient_audio_transcription.delta​

Description: Smart_turn mode only. Incremental ambient audio transcription results. When VAD detects speech activity but semantic analysis deems it an invalid turn (such as noise or non-semantic sounds like "um" or "ah"), ASR results are passed to the client as ambient events. This event is not associated with any item in the conversation context; item_id is an independently generated temporary ID.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "conversation.item.ambient_audio_transcription.delta", "item_id": "item_xxx", "content_index": 0, "text": "嗯", "stash": "" }
type *string* Event type, fixed to conversation.item.ambient_audio_transcription.delta.
item\_id *string* Independently generated temporary ID, not associated with any item in the conversation context.
content\_index *integer* Index of the content part.
text *string* Confirmed transcription text.
stash *string* Tentative text not yet confirmed.

conversation.item.ambient_audio_transcription.completed​

Description: Smart_turn mode only. Final ambient audio transcription result. Paired with delta events, this marks the end of transcription for an ambient audio segment. The result is not written to the conversation context.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "conversation.item.ambient_audio_transcription.completed", "item_id": "item_xxx", "content_index": 0, "transcript": "嗯" }
type *string* Event type, fixed to conversation.item.ambient_audio_transcription.completed.
item\_id *string* Independently generated temporary ID, not associated with the conversation context.
content\_index *integer* Index of the content part.
transcript *string* Complete transcription text.

response.created​

Description: A model inference has started.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.created", "response": { "id": "resp_xxx", "object": "realtime.response", "status": "in_progress", "modalities": ["text", "audio"], "voice": "longanqian", "output": [] } }
type *string* Event type, fixed to response.created.
response *object* Response object. Properties id *string* Unique response identifier. object *string* Fixed to realtime.response. status *string* Response status, such as in_progress. modalities *array* Model output modalities. voice *string* Voice for model-generated audio: a system voice name or the voice_id of a cloned voice. output *array* List of response output items, initially an empty array.

response.output_item.added​

Description: A new output item was added to the response. Regular replies use the message item type; Function Calling uses function_call.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.output_item.added", "response_id": "resp_xxx", "output_index": 0, "item": { "id": "item_xxx", "object": "realtime.item", "type": "message", "status": "in_progress", "role": "assistant", "content": [] } } Function Call output item example: For function call output items, item in response.output_item.added / conversation.item.created / response.output_item.done has the following structure: { "id": "item_xxx", "object": "realtime.item", "type": "function_call", "status": "completed", "call_id": "call_xxx", "name": "get_weather", "arguments": "{\\"city\\":\\"杭州\\"}" } Note A response may contain multiple function_call items, or both regular message output and function_call output. Function Call content is not sent to TTS for playback.
type *string* Event type, fixed to response.output_item.added.
response\_id *string* Associated response ID.
output\_index *integer* Index of the output item in the response.
item *object* Newly added output item. Properties id *string* Unique output item identifier. object *string* Fixed to realtime.item. type *string* Output item type: message (regular message) or function_call (function call). status *string* Output item status, such as in_progress. role *string* Message role, fixed to assistant. Present only for message items. content *array* List of message content elements. Present only for message items.

response.content_part.added​

Description: A new content part was added to an output item.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.content_part.added", "response_id": "resp_xxx", "item_id": "item_xxx", "output_index": 0, "content_index": 0, "part": { "type": "audio", "text": "" } }
type *string* Event type, fixed to response.content_part.added.
response\_id *string* Associated response ID.
item\_id *string* Associated output item ID.
output\_index *integer* Index of the output item in the response.
content\_index *integer* Index of the content part in the output item.
part *object* Newly added content part. Properties type *string* Content type, such as audio or text. text *string* Text content, initially an empty string.

response.text.delta​

Description: A text delta event in text-only mode, streaming text fragments.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.text.delta", "response_id": "resp_xxx", "item_id": "item_xxx", "output_index": 0, "content_index": 0, "delta": "你好" }
type *string* Event type, fixed to response.text.delta.
response\_id *string* Associated response ID.
item\_id *string* Associated output item ID.
output\_index *integer* Index of the output item in the response.
content\_index *integer* Index of the content part in the output item.
delta *string* Incremental text fragment.

response.text.done​

Description: Indicates that text output in text-only mode is complete.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.text.done", "response_id": "resp_xxx", "item_id": "item_xxx", "output_index": 0, "content_index": 0, "text": "你好,有什么可以帮助你的吗?" }
type *string* Event type, fixed to response.text.done.
response\_id *string* Associated response ID.
item\_id *string* Associated output item ID.
output\_index *integer* Index of the output item in the response.
content\_index *integer* Index of the content part in the output item.
text *string* Complete text output.

response.audio_transcript.delta​

Description: A transcript delta event in audio mode, streaming transcript fragments.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.audio_transcript.delta", "response_id": "resp_xxx", "item_id": "item_xxx", "output_index": 0, "content_index": 0, "delta": "你好" }
type *string* Event type, fixed to response.audio_transcript.delta.
response\_id *string* Associated response ID.
item\_id *string* Associated output item ID.
output\_index *integer* Index of the output item in the response.
content\_index *integer* Index of the content part in the output item.
delta *string* Incremental transcript fragment.

response.audio_transcript.done​

Description: Indicates that transcript output in audio mode is complete.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.audio_transcript.done", "response_id": "resp_xxx", "item_id": "item_xxx", "output_index": 0, "content_index": 0, "transcript": "你好,有什么可以帮助你的吗?" }
type *string* Event type, fixed to response.audio_transcript.done.
response\_id *string* Associated response ID.
item\_id *string* Associated output item ID.
output\_index *integer* Index of the output item in the response.
content\_index *integer* Index of the content part in the output item.
transcript *string* Complete transcript text.

response.audio.delta​

Description: An audio data delta event in audio mode. The delta field contains Base64-encoded PCM audio data.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.audio.delta", "response_id": "resp_xxx", "item_id": "item_xxx", "output_index": 0, "content_index": 0, "delta": "<base64 编码的音频数据>" }
type *string* Event type, fixed to response.audio.delta.
response\_id *string* Associated response ID.
item\_id *string* Associated output item ID.
output\_index *integer* Index of the output item in the response.
content\_index *integer* Index of the content part in the output item.
delta *string* Base64-encoded PCM audio data chunk.

response.audio.done​

Description: Indicates that audio output in audio mode is complete. Contains no audio data.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.audio.done", "response_id": "resp_xxx", "item_id": "item_xxx", "output_index": 0, "content_index": 0 }
type *string* Event type, fixed to response.audio.done.
response\_id *string* Associated response ID.
item\_id *string* Associated output item ID.
output\_index *integer* Index of the output item in the response.
content\_index *integer* Index of the content part in the output item.

response.content_part.done​

Description: Output of a content part within an output item is complete.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.content_part.done", "response_id": "resp_xxx", "item_id": "item_xxx", "output_index": 0, "content_index": 0, "part": { "type": "audio", "text": "你好,有什么可以帮助你的吗?" } }
type *string* Event type, fixed to response.content_part.done.
response\_id *string* Associated response ID.
item\_id *string* Associated output item ID.
output\_index *integer* Index of the output item in the response.
content\_index *integer* Index of the content part in the output item.
part *object* Completed content part. Properties type *string* Content type, such as audio or text. text *string* Text content or audio transcript text.

response.output_item.done​

Description: Output of an item in the response is complete.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.output_item.done", "response_id": "resp_xxx", "output_index": 0, "item": { "id": "item_xxx", "object": "realtime.item", "type": "message", "status": "completed", "role": "assistant", "content": [ { "type": "text", "text": "你好,有什么可以帮助你的吗?" } ] } }
type *string* Event type, fixed to response.output_item.done.
response\_id *string* Associated response ID.
output\_index *integer* Index of the output item in the response.
item *object* Complete information for the finished output item. Properties id *string* Unique output item identifier. object *string* Fixed to realtime.item. type *string* Output item type: message (regular message) or function_call (function call). status *string* Output item status, such as completed. role *string* Message role, fixed to assistant. Present only for message items. content *array* List of message content elements. Present only for message items.

response.function_call_arguments.delta​

Description: Incremental Function Calling arguments. When the model decides to call a tool, the server first sends response.output_item.added (item.type=function_call) and the corresponding conversation.item.created, then streams argument fragments through this event.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.function_call_arguments.delta", "response_id": "resp_xxx", "item_id": "item_xxx", "output_index": 0, "call_id": "call_xxx", "delta": "{\\"city" }
type *string* Event type, fixed to response.function_call_arguments.delta.
response\_id *string* Associated response ID.
item\_id *string* Associated output item ID.
output\_index *integer* Index of the output item in the response.
call\_id *string* Unique function call identifier.
delta *string* Incremental function call argument fragment (a JSON string fragment).

response.function_call_arguments.done​

Description: Function Calling argument output is complete. On receiving this event, the client should execute the corresponding tool, submit function_call_output using conversation.item.create, and then send response.create to trigger a second inference.

event\_id *string* Unique identifier of this event.{ "event_id": "event_xxx", "type": "response.function_call_arguments.done", "response_id": "resp_xxx", "item_id": "item_xxx", "output_index": 0, "call_id": "call_xxx", "name": "get_weather", "arguments": "{\\"city\\":\\"杭州\\"}" }
type *string* Event type, fixed to response.function_call_arguments.done.
response\_id *string* Associated response ID.
item\_id *string* Associated output item ID.
output\_index *integer* Index of the output item in the response.
call\_id *string* Unique function call identifier.
name *string* Name of the called function.
arguments *string* Complete function call arguments (a JSON string).

response.done​

Description: An inference has finished. status indicates why it ended.

event\_id *string* Unique identifier of this event.## Completed normally { "event_id": "event_xxx", "type": "response.done", "response": { "id": "resp_xxx", "object": "realtime.response", "status": "completed", "modalities": ["text", "audio"], "voice": "longanqian", "output": [ { "id": "item_xxx", "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 } } } } ## Cancelled by interruption { "event_id": "event_xxx", "type": "response.done", "response": { "id": "resp_xxx", "status": "cancelled", "status_details": { "type": "cancelled", "reason": "turn_detected" } } }
type *string* Event type, fixed to response.done.
response *object* Complete response object. Properties id *string* Unique response identifier. object *string* Fixed to realtime.response. status *string* Final response status. Valid values: - completed: Completed normally. - cancelled: Cancelled by interruption. status_details.reason is turn_detected (VAD interruption) or client_cancelled (client cancellation). - failed: LLM or TTS error. status\_details *object* Status details, present only for cancelled or failed. Properties type *string* Status type, such as cancelled. reason *string* Cancellation reason: turn_detected (VAD interruption) or client_cancelled (client cancellation). modalities *array* Model output modalities. voice *string* Voice for model-generated audio: a system voice name or the voice_id of a cloned voice. output *array* List of response output items, containing complete item objects. usage *object* Token usage for this response. Returned only when status is completed. Properties total\_tokens *integer* Total tokens consumed by this response. input\_tokens *integer* Number of input tokens. output\_tokens *integer* Number of output tokens. input\_tokens\_details *object* Input token breakdown, containing text_tokens (text token count) and audio_tokens (audio token count, present only when the audio modality is used). output\_tokens\_details *object* Output token breakdown, containing text_tokens (text token count) and audio_tokens (audio token count, present only when the audio modality is used). plugins *object* (optional) Plugin usage metrics. Returned when web search (enable_search) is enabled. Properties search *object* Web search usage metrics. Properties count *integer* Number of searches. strategy *string* Search strategy.

voiceprint_audio_list.in_progress​

Description: Asynchronous voiceprint registration is in progress.

event\_id *string* Unique identifier of this event.{ "event_id": "event_PaEcN7CCrlhE8q4MM2yND", "type": "voiceprint_audio_list.in_progress", "item_id": "vp_Y12cA986j1KZ9O9YmAXOA" }
type *string* Event type, fixed to voiceprint_audio_list.in_progress.
item\_id *string* Unique voiceprint registration task identifier.

voiceprint_audio_list.completed​

Description: Voiceprint registration is complete.

event\_id *string* Unique identifier of this event.{ "event_id": "event_PaEcN7CCrlhE8q4MM2yND", "type": "voiceprint_audio_list.completed", "item_id": "vp_Y12cA986j1KZ9O9YmAXOA" }
type *string* Event type, fixed to voiceprint_audio_list.completed.
item\_id *string* Unique voiceprint registration task identifier.

voiceprint_audio_list.failed​

Description: Voiceprint registration failed. Normal conversation requests are not blocked.

event\_id *string* Unique identifier of this event.{ "event_id": "event_PaEcN7CCrlhE8q4MM2yND", "type": "voiceprint_audio_list.failed", "item_id": "vp_Y12cA986j1KZ9O9YmAXOA", "reason": "" }
type *string* Event type, fixed to voiceprint_audio_list.failed.
item\_id *string* Unique voiceprint registration task identifier.
reason *string* Description of the failure reason.