Server event reference for the Qwen-Audio Realtime API. All server events include the event_id (auto-generated by the server) and type (event type) fields.
User guide: Realtime Audio Chat (Qwen-Audio-Realtime). For event interaction sequences, see WebSocket API.
error
Description: Returned when a request fails or a service error occurs. Client errors (invalid_request_error) keep the connection open. Server errors (server_error) terminate the connection.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
error Error details. |
session.created
Description: The first event sent by the server after the connection is established. Contains the default session configuration.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
session Session configuration. |
session.updated
Description: Returned after a session.update request is processed successfully. Contains the full updated session configuration. If the request fails, an error event is returned instead.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
session Full session configuration after the update. Shares the same structure as the session object in |
input_audio_buffer.speech_started
Description: Sent when Voice Activity Detection (VAD) detects the start of speech in server_vad / smart_turn mode.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
audio_start_ms Timestamp in milliseconds when speech started. |
|
|
item_id ID of the item that will be created when this speech segment is committed. |
input_audio_buffer.speech_stopped
Description: Sent when VAD detects the end of speech in server_vad / smart_turn mode.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
audio_end_ms Timestamp in milliseconds when speech ended. |
|
|
item_id ID of the user message item to be created. |
|
|
reason Returned only in smart_turn mode. When set to |
input_audio_buffer.committed
Description: The audio buffer has been committed as a user message, either through a push-to-talk commit or automatic VAD commit.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
previous_item_id ID of the previous conversation item. |
|
|
item_id 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 Unique identifier for this event. |
|
|
type Event type. Always |
conversation.item.created
Description: A new conversation item was created. Triggered when user audio is committed, the client manually creates an item, or an assistant response begins.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
previous_item_id ID of the previous conversation item. |
|
|
item The created conversation item. |
conversation.item.deleted
Description: A conversation item was deleted. Returned as a confirmation after the client sends a conversation.item.delete event.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
item_id ID of the deleted conversation item. |
conversation.item.retrieved
Description: A conversation item was retrieved successfully. Returned after the client sends a conversation.item.retrieve event. For audio-type content, only the transcript text is included; raw audio data isn't returned.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
item The retrieved conversation item. |
conversation.item.input_audio_transcription.delta
Description: Incremental Automatic Speech Recognition (ASR) transcription result, streamed during speech recognition. Includes emotion and language detection information.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
item_id ID of the associated conversation item. |
|
|
content_index Index of the content part. |
|
|
text Finalized transcription text. |
|
|
stash Tentative text that hasn't been finalized yet. |
conversation.item.input_audio_transcription.completed
Description: Final ASR transcription result. The transcribed text is written to the transcript field of the corresponding item.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
item_id ID of the associated conversation item. |
|
|
content_index Index of the content part. |
|
|
transcript The complete transcription text. |
conversation.item.input_audio_transcription.failed
Description: ASR transcription failed.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
item_id ID of the associated conversation item. |
|
|
content_index Index of the content part. |
|
|
error Error details. |
conversation.item.ambient_audio_transcription.delta
Description: smart_turn mode only. Incremental transcription result for ambient audio. When VAD detects voice activity but semantic analysis classifies the turn as invalid (for example, background noise or filler words like "hmm" or "uh"), the ASR result is forwarded to the client as an ambient event. This event isn't linked to any conversation item. The item_id is a standalone temporary ID.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
item_id A standalone temporary ID, not associated with any conversation item. |
|
|
content_index Index of the content part. |
|
|
text Finalized transcription text. |
|
|
stash Tentative text that hasn't been finalized yet. |
conversation.item.ambient_audio_transcription.completed
Description: smart_turn mode only. Final transcription result for ambient audio. Paired with the corresponding delta event to mark the end of an ambient audio transcription segment. This result isn't written to the conversation context.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
item_id A standalone temporary ID, not associated with the conversation context. |
|
|
content_index Index of the content part. |
|
|
transcript The complete transcription text. |
response.created
Description: Sent when a model inference round starts.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response The response object. |
response.output_item.added
Description: A new output item was added to the response. The output item type is message for standard replies, or function_call for Function Calling.
|
event_id Unique identifier for this event. |
Function Calling output item example: When the output item is a function call, the
Note
A single response can include multiple |
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
output_index Index of the output item within the response. |
|
|
item The added output item. |
response.content_part.added
Description: A new content part was added to an output item.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
item_id Associated output item ID. |
|
|
output_index Index of the output item within the response. |
|
|
content_index Index of the content part within the output item. |
|
|
part The added content part. |
response.text.delta
Description: Text delta event in text-only mode. Streams text fragments incrementally.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
item_id Associated output item ID. |
|
|
output_index Index of the output item within the response. |
|
|
content_index Index of the content part within the output item. |
|
|
delta Incremental text fragment. |
response.text.done
Description: Text output complete event in text-only mode.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
item_id Associated output item ID. |
|
|
output_index Index of the output item within the response. |
|
|
content_index Index of the content part within the output item. |
|
|
text The complete text output. |
response.audio_transcript.delta
Description: Transcript delta event in audio mode. Streams transcript fragments incrementally.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
item_id Associated output item ID. |
|
|
output_index Index of the output item within the response. |
|
|
content_index Index of the content part within the output item. |
|
|
delta Incremental transcript fragment. |
response.audio_transcript.done
Description: Transcript output complete event in audio mode.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
item_id Associated output item ID. |
|
|
output_index Index of the output item within the response. |
|
|
content_index Index of the content part within the output item. |
|
|
transcript The complete transcript text. |
response.audio.delta
Description: Audio data delta event in audio mode. The delta field contains Base64-encoded PCM audio data.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
item_id Associated output item ID. |
|
|
output_index Index of the output item within the response. |
|
|
content_index Index of the content part within the output item. |
|
|
delta Base64-encoded PCM audio data fragment. |
response.audio.done
Description: Audio output complete event in audio mode. Contains no audio data.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
item_id Associated output item ID. |
|
|
output_index Index of the output item within the response. |
|
|
content_index Index of the content part within the output item. |
response.content_part.done
Description: A content part within an output item has completed.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
item_id Associated output item ID. |
|
|
output_index Index of the output item within the response. |
|
|
content_index Index of the content part within the output item. |
|
|
part The completed content part. |
response.output_item.done
Description: An output item within the response has completed.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
output_index Index of the output item within the response. |
|
|
item The completed output item with full details. |
response.function_call_arguments.delta
Description: Function Calling argument delta. When the model decides to invoke a tool, the server first sends response.output_item.added (with item.type=function_call) and conversation.item.created, then streams argument fragments through this event.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
item_id Associated output item ID. |
|
|
output_index Index of the output item within the response. |
|
|
call_id Unique identifier for the function call. |
|
|
delta Incremental fragment of the function call arguments (JSON string fragment). |
response.function_call_arguments.done
Description: Sent when Function Calling argument output is complete. After receiving this event, the client should: execute the corresponding tool, write the result to the conversation via conversation.item.create with a function_call_output item, and then send response.create to trigger a follow-up inference round.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
response_id Associated response ID. |
|
|
item_id Associated output item ID. |
|
|
output_index Index of the output item within the response. |
|
|
call_id Unique identifier for the function call. |
|
|
name Name of the invoked function. |
|
|
arguments Complete function call arguments (JSON string). |
response.done
Description: An inference round is complete. status indicates the reason for completion.
|
event_id Unique identifier for this event. |
Completed normally
Interrupted and cancelled
|
|
type Event type. Always |
|
|
response The complete response object. |
voiceprint_audio_list.in_progress
Description: The voiceprint registration process is in progress asynchronously.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
item_id Unique identifier for the voiceprint registration task. |
voiceprint_audio_list.completed
Description: The voiceprint registration process has completed successfully.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
item_id Unique identifier for the voiceprint registration task. |
voiceprint_audio_list.failed
Description: The voiceprint registration failed. Normal conversation calls are not blocked.
|
event_id Unique identifier for this event. |
|
|
type Event type. Always |
|
|
item_id Unique identifier for the voiceprint registration task. |
|
|
reason Description of the failure reason. |