Server events are pushed from the server to the client. All server events include the common fields event_id (a unique identifier automatically generated by the server) and type (the event type).
User guide: Real-time voice conversation (Qwen-Audio-Realtime). For the event interaction timeline, see WebSocket API.
error
Returned when a request is invalid or a service error occurs. Client errors (invalid_request_error) do not interrupt the connection; server errors (server_error) terminate the connection.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as error. |
| error | object | Error details. |
| error.type | string | Error type, such as invalid_request_error (client error) or server_error (server error). |
| error.code | string | Error code. |
| error.message | string | Error message. |
| error.param | string | The parameter related to the error. |
{
"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"
}
}
session.created
The first event sent by the server after the connection is established, carrying the default session configuration.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as session.created. |
| session | object | The session configuration. |
| session.object | string | Fixed as realtime.session. |
| session.model | string | The name of the model in use. |
| session.modalities | array | The model's output modalities. |
| session.voice | string | The voice used for generated audio — either a system voice name or the voice_id of a voice-cloning voice. |
| session.input_audio_transcription | object | Speech transcription configuration. |
| session.input_audio_transcription.model | string | The speech transcription model, such as fun-asr. |
| session.turn_detection | object | Turn detection (VAD) configuration. |
| session.id | string | The unique identifier of the session. |
{
"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"
}
}
session.updated
Returned after a session.update request is processed successfully, carrying the complete updated session configuration. If an error occurs, an error event is returned instead.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as session.updated. |
| session | object | The complete updated session configuration. The structure matches the session object in session.created. |
{
"event_id": "event_FMG6kiHbILCGiqXFPA98e",
"type": "session.updated",
"session": {
"id": "sess_A1LbG2D63WELBSawRbpq8",
"object": "realtime.session",
"model": "qwen-audio-3.0-realtime-plus",
"modalities": ["text", "audio"],
"voice": "longanqian",
"input_audio_transcription": {
"model": "fun-asr"
},
"turn_detection": {
"type": "smart_turn",
"threshold": 0.1,
"silence_duration_ms": 900
}
}
}
The VAD detected the start of speech (server_vad / smart_turn mode).
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as input_audio_buffer.speech_started. |
| audio_start_ms | integer | The timestamp (in milliseconds) when speech started. |
| item_id | string | The ID of the item that will be created once this segment of speech is committed. |
{
"event_id": "event_xxx",
"type": "input_audio_buffer.speech_started",
"audio_start_ms": 1200,
"item_id": "item_xxx"
}
The VAD detected the end of speech (server_vad / smart_turn mode).
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as input_audio_buffer.speech_stopped. |
| audio_end_ms | integer | The timestamp (in milliseconds) when speech ended. |
| item_id | string | The ID of the user message item that will be created. |
| reason | string | Returned only in smart_turn mode. A value of turn_invalid indicates the current turn was judged invalid (no semantic content) and does not trigger inference. This field is not returned for valid turns. |
{
"event_id": "event_xxx",
"type": "input_audio_buffer.speech_stopped",
"audio_end_ms": 3400,
"item_id": "item_xxx",
"reason": "turn_invalid"
}
The audio buffer was committed as a user message (either via a push-to-talk commit or automatic VAD commit).
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as input_audio_buffer.committed. |
| previous_item_id | string | The ID of the previous conversation item. |
| item_id | string | The ID of the created user message item. |
{
"event_id": "event_xxx",
"type": "input_audio_buffer.committed",
"previous_item_id": "item_xxx",
"item_id": "item_xxx"
}
The audio buffer was cleared (push-to-talk mode only).
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as input_audio_buffer.cleared. |
{
"event_id": "event_xxx",
"type": "input_audio_buffer.cleared"
}
conversation.item.created
A new conversation item was created successfully. Triggered when a user audio message is committed, the client manually creates an item, or an assistant response begins.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as conversation.item.created. |
| previous_item_id | string | The ID of the previous conversation item. |
| item | object | The created conversation item. |
| item.id | string | The unique identifier of the conversation item. |
| item.object | string | Fixed as realtime.item. |
| item.type | string | The item type: message (a regular message) or function_call (a function call). |
| item.status | string | The item status, such as in_progress or completed. |
| item.role | string | The message role, such as user or assistant. Included only for message items. |
| item.content | array | The list of message content. Included only for message items. |
{
"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": []
}
}
conversation.item.deleted
A conversation item was deleted. Returned as confirmation after the client sends conversation.item.delete.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as conversation.item.deleted. |
| item_id | string | The ID of the deleted conversation item. |
{
"event_id": "event_xxx",
"type": "conversation.item.deleted",
"item_id": "item_xxx"
}
conversation.item.retrieved
A conversation item was retrieved successfully. Returned after the client sends conversation.item.retrieve. For audio-type content, only the transcript is returned, not the original audio data.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as conversation.item.retrieved. |
| item | object | The complete retrieved conversation item. |
| item.id | string | The unique identifier of the conversation item. |
| item.object | string | Fixed as realtime.item. |
| item.type | string | The item type: message (a regular message) or function_call (a function call). |
| item.role | string | The message role, such as user or assistant. Included only for message items. |
| item.content | array | The list of message content. For audio-type content, only the transcript is returned, not the original audio data. |
{
"event_id": "event_xxx",
"type": "conversation.item.retrieved",
"item": {
"id": "item_xxx",
"object": "realtime.item",
"type": "message",
"role": "user",
"content": [
{
"type": "input_audio",
"transcript": "Hello"
}
]
}
}
Incremental ASR transcription results, streamed during speech recognition. Includes emotion and language detection information.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as 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. |
| text | string | The finalized transcription text. |
| stash | string | Provisional text that has not yet been finalized. |
{
"event_id": "event_xxx",
"type": "conversation.item.input_audio_transcription.delta",
"item_id": "item_xxx",
"content_index": 0,
"text": "Hello",
"stash": "world"
}
The final ASR transcription result. The transcription text is written to the transcript field of the corresponding item.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as conversation.item.input_audio_transcription.completed. |
| item_id | string | The ID of the associated conversation item. |
| content_index | integer | The index of the content part. |
| transcript | string | The complete transcription text. |
{
"event_id": "event_xxx",
"type": "conversation.item.input_audio_transcription.completed",
"item_id": "item_xxx",
"content_index": 0,
"transcript": "Hello world"
}
ASR transcription failed.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as conversation.item.input_audio_transcription.failed. |
| item_id | string | The ID of the associated conversation item. |
| content_index | integer | The index of the content part. |
| error | object | Error details. |
| error.type | string | Error type, such as transcription_error. |
| error.code | string | Error code, such as transcription_failed. |
| error.message | string | Error message. |
{
"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"
}
}
conversation.item.ambient_audio_transcription.delta
smart_turn mode only. This event is not associated with any item in the conversation context.
Incremental ambient audio transcription results. When the VAD detects voice activity but semantic judgment determines the turn is not valid (for example, noise or non-semantic sounds like "um" or "uh"), the ASR result is passed through to the client as an ambient event. item_id is a separately generated, temporary ID.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as conversation.item.ambient_audio_transcription.delta. |
| item_id | string | A separately generated, temporary ID; not associated with any item in the conversation context. |
| content_index | integer | The index of the content part. |
| text | string | The finalized transcription text. |
| stash | string | Provisional text that has not yet been finalized. |
{
"event_id": "event_xxx",
"type": "conversation.item.ambient_audio_transcription.delta",
"item_id": "item_xxx",
"content_index": 0,
"text": "Um",
"stash": ""
}
conversation.item.ambient_audio_transcription.completed
smart_turn mode only. This transcription result is not written to the conversation context.
The final ambient audio transcription result. Paired with the delta event, indicating that transcription of a segment of ambient audio is complete.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as conversation.item.ambient_audio_transcription.completed. |
| item_id | string | A separately generated, temporary ID; not associated with the conversation context. |
| content_index | integer | The index of the content part. |
| transcript | string | The complete transcription text. |
{
"event_id": "event_xxx",
"type": "conversation.item.ambient_audio_transcription.completed",
"item_id": "item_xxx",
"content_index": 0,
"transcript": "Um"
}
response.created
A round of model inference has started.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.created. |
| response | object | The response object. |
| response.id | string | The unique identifier of the response. |
| response.object | string | Fixed as realtime.response. |
| response.status | string | The response status, such as in_progress. |
| response.modalities | array | The model's output modalities. |
| response.voice | string | The voice used for generated audio — either a system voice name or the voice_id of a voice-cloning voice. |
| response.output | array | The list of output items for the response; initially an empty array. |
{
"event_id": "event_xxx",
"type": "response.created",
"response": {
"id": "resp_xxx",
"object": "realtime.response",
"status": "in_progress",
"modalities": ["text", "audio"],
"voice": "longanqian",
"output": []
}
}
response.output_item.added
A new output item was added to the response. Output items for regular replies have type message; output items for function calling have type function_call.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.output_item.added. |
| response_id | string | The ID of the associated response. |
| output_index | integer | The index of the output item within the response. |
| item | object | The added output item. |
| item.id | string | The unique identifier of the output item. |
| item.object | string | Fixed as realtime.item. |
| item.type | string | The output item type: message (a regular message) or function_call (a function call). |
| item.status | string | The output item status, such as in_progress. |
| item.role | string | The message role, fixed as assistant. Included only for message items. |
| item.content | array | The list of message content. Included only for message items. |
Example of a regular message output item:
{
"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": []
}
}
Example of a function call output item:
When the output item is a function call, the item structure in response.output_item.added, conversation.item.created, and response.output_item.done is as follows:
{
"id": "item_xxx",
"object": "realtime.item",
"type": "function_call",
"status": "completed",
"call_id": "call_xxx",
"name": "get_weather",
"arguments": "{\"city\":\"Hangzhou\"}"
}
A single response can include multiple function_call items, and may include both a regular message output and function_call outputs at the same time. Function call content is not sent to TTS for playback.
response.content_part.added
A new content part was added to an output item.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.content_part.added. |
| response_id | string | The ID of the associated response. |
| item_id | string | The ID of the associated output item. |
| output_index | integer | The index of the output item within the response. |
| content_index | integer | The index of the content part within the output item. |
| part | object | The added content part. |
| part.type | string | The content type, such as audio or text. |
| part.text | string | The text content; initially an empty string. |
{
"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": ""
}
}
response.text.delta
Incremental text event in text-only mode, streaming text fragments.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.text.delta. |
| response_id | string | The ID of the associated response. |
| item_id | string | The ID of the associated output item. |
| output_index | integer | The index of the output item within the response. |
| content_index | integer | The index of the content part within the output item. |
| delta | string | The incremental text fragment. |
{
"event_id": "event_xxx",
"type": "response.text.delta",
"response_id": "resp_xxx",
"item_id": "item_xxx",
"output_index": 0,
"content_index": 0,
"delta": "Hello"
}
response.text.done
Text output complete, in text-only mode.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.text.done. |
| response_id | string | The ID of the associated response. |
| item_id | string | The ID of the associated output item. |
| output_index | integer | The index of the output item within the response. |
| content_index | integer | The index of the content part within the output item. |
| text | string | The complete text output. |
{
"event_id": "event_xxx",
"type": "response.text.done",
"response_id": "resp_xxx",
"item_id": "item_xxx",
"output_index": 0,
"content_index": 0,
"text": "Hello! How can I help you?"
}
response.audio_transcript.delta
Incremental caption text event in audio mode, streaming caption fragments.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.audio_transcript.delta. |
| response_id | string | The ID of the associated response. |
| item_id | string | The ID of the associated output item. |
| output_index | integer | The index of the output item within the response. |
| content_index | integer | The index of the content part within the output item. |
| delta | string | The incremental caption fragment. |
{
"event_id": "event_xxx",
"type": "response.audio_transcript.delta",
"response_id": "resp_xxx",
"item_id": "item_xxx",
"output_index": 0,
"content_index": 0,
"delta": "Hello"
}
response.audio_transcript.done
Caption output complete, in audio mode.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.audio_transcript.done. |
| response_id | string | The ID of the associated response. |
| item_id | string | The ID of the associated output item. |
| output_index | integer | The index of the output item within the response. |
| content_index | integer | The index of the content part within the output item. |
| transcript | string | The complete caption text. |
{
"event_id": "event_xxx",
"type": "response.audio_transcript.done",
"response_id": "resp_xxx",
"item_id": "item_xxx",
"output_index": 0,
"content_index": 0,
"transcript": "Hello! How can I help you?"
}
response.audio.delta
Incremental audio data event in audio mode. The delta field is Base64-encoded PCM audio data.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.audio.delta. |
| response_id | string | The ID of the associated response. |
| item_id | string | The ID of the associated output item. |
| output_index | integer | The index of the output item within the response. |
| content_index | integer | The index of the content part within the output item. |
| delta | string | A Base64-encoded fragment of PCM audio data. |
{
"event_id": "event_xxx",
"type": "response.audio.delta",
"response_id": "resp_xxx",
"item_id": "item_xxx",
"output_index": 0,
"content_index": 0,
"delta": "<base64-encoded audio data>"
}
response.audio.done
Audio output complete, in audio mode. Does not include audio data.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.audio.done. |
| response_id | string | The ID of the associated response. |
| item_id | string | The ID of the associated output item. |
| output_index | integer | The index of the output item within the response. |
| content_index | integer | The index of the content part within the output item. |
{
"event_id": "event_xxx",
"type": "response.audio.done",
"response_id": "resp_xxx",
"item_id": "item_xxx",
"output_index": 0,
"content_index": 0
}
response.content_part.done
A content part within an output item has finished being output.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.content_part.done. |
| response_id | string | The ID of the associated response. |
| item_id | string | The ID of the associated output item. |
| output_index | integer | The index of the output item within the response. |
| content_index | integer | The index of the content part within the output item. |
| part | object | The completed content part. |
| part.type | string | The content type, such as audio or text. |
| part.text | string | The text content or audio caption text. |
{
"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": "Hello! How can I help you?"
}
}
response.output_item.done
An output item within the response has finished being output.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.output_item.done. |
| response_id | string | The ID of the associated response. |
| output_index | integer | The index of the output item within the response. |
| item | object | The complete finished output item. |
| item.id | string | The unique identifier of the output item. |
| item.object | string | Fixed as realtime.item. |
| item.type | string | The output item type: message (a regular message) or function_call (a function call). |
| item.status | string | The output item status, such as completed. |
| item.role | string | The message role, fixed as assistant. Included only for message items. |
| item.content | array | The list of message content. Included only for message items. |
{
"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": "Hello! How can I help you?"
}
]
}
}
response.function_call_arguments.delta
Incremental function calling arguments. When the model decides to call a tool, the server first sends response.output_item.added (with item.type=function_call) and the corresponding conversation.item.created, then streams the argument fragments via this event.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.function_call_arguments.delta. |
| response_id | string | The ID of the associated response. |
| item_id | string | The ID of the associated output item. |
| output_index | integer | The index of the output item within the response. |
| call_id | string | The unique identifier of the function call. |
| delta | string | An incremental fragment of the function call arguments (a JSON string fragment). |
{
"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"
}
response.function_call_arguments.done
Function calling arguments output complete. After receiving this event, the client should execute the corresponding tool, write back a function_call_output via conversation.item.create, and then send response.create to trigger the second round of inference.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.function_call_arguments.done. |
| response_id | string | The ID of the associated response. |
| item_id | string | The ID of the associated output item. |
| output_index | integer | The index of the output item within the response. |
| call_id | string | The unique identifier of the function call. |
| name | string | The name of the called function. |
| arguments | string | The complete function call arguments (a JSON string). |
{
"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\":\"Hangzhou\"}"
}
response.done
A round of inference is complete. status indicates the reason for completion.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as response.done. |
| response | object | The complete response object. |
| response.id | string | The unique identifier of the response. |
| response.object | string | Fixed as realtime.response. |
| response.status | string | The final status of the response: completed (finished normally), cancelled (interrupted and cancelled), or failed (LLM or TTS error). |
| response.status_details | object | Status details, present only when cancelled or failed. |
| response.status_details.type | string | The status type, such as cancelled. |
| response.status_details.reason | string | The cancellation reason: turn_detected (interrupted by VAD) or client_cancelled (cancelled by the client). |
| response.modalities | array | The model's output modalities. |
| response.voice | string | The voice used for generated audio — either a system voice name or the voice_id of a voice-cloning voice. |
| response.output | array | The list of output items for the response, containing the complete item objects. |
{
"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": "Hello! How can I help you?"
}
]
}
]
}
}
{
"event_id": "event_xxx",
"type": "response.done",
"response": {
"id": "resp_xxx",
"status": "cancelled",
"status_details": {
"type": "cancelled",
"reason": "turn_detected"
}
}
}
voiceprint_audio_list.in_progress
Voiceprint enrollment is proceeding asynchronously.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as voiceprint_audio_list.in_progress. |
| item_id | string | The unique identifier of the voiceprint enrollment task. |
{
"event_id": "event_PaEcN7CCrlhE8q4MM2yND",
"type": "voiceprint_audio_list.in_progress",
"item_id": "vp_Y12cA986j1KZ9O9YmAXOA"
}
voiceprint_audio_list.completed
Voiceprint enrollment is complete.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as voiceprint_audio_list.completed. |
| item_id | string | The unique identifier of the voiceprint enrollment task. |
{
"event_id": "event_PaEcN7CCrlhE8q4MM2yND",
"type": "voiceprint_audio_list.completed",
"item_id": "vp_Y12cA986j1KZ9O9YmAXOA"
}
voiceprint_audio_list.failed
Voiceprint enrollment failed. This does not block normal conversation calls.
| Field | Type | Description |
|---|
| event_id | string | The unique identifier of this event. |
| type | string | Event type, fixed as voiceprint_audio_list.failed. |
| item_id | string | The unique identifier of the voiceprint enrollment task. |
| reason | string | A description of the failure reason. |
{
"event_id": "event_PaEcN7CCrlhE8q4MM2yND",
"type": "voiceprint_audio_list.failed",
"item_id": "vp_Y12cA986j1KZ9O9YmAXOA",
"reason": ""
}