Server events
Server events for the Qwen-Omni-Realtime API, including tool calling (function calling) events.
See Qwen-Omni-Realtime.
error
Server error.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
error Error details. |
session.created
Returned when a client connects. Contains the default session configuration.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
session The session configuration. |
session.updated
Returned after a successful session.update request. On failure, an error event is returned instead.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
session The session configuration. |
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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
audio_start_ms Time (ms) from when audio buffer writing starts until speech is first detected. |
|
|
item_id 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
audio_end_ms Time (ms) from session start until end-of-speech is detected. |
|
|
item_id 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
item_id 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
conversation.item.created
Returned when a conversation item is created.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
item The conversation item to add. |
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.
|
event_id A unique identifier for this event. |
To get the most complete sentence preview at any moment, concatenate these two fields: real-time preview = |
|
type The event type. This value is always |
|
|
item_id The ID of the associated conversation item. |
|
|
content_index The index of the content part that contains the audio. |
|
|
text Confirmed text prefix — the portion the model has finalized and will not change. |
|
|
stash Preliminary text suffix — a temporary draft following the confirmed portion, subject to revision. |
|
|
language The detected language of the recognized audio. |
|
|
emotion The detected emotion of the recognized audio. Valid values: |
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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
item_id The ID of the user message item. |
|
|
content_index integer This value is always 0. |
|
|
transcript 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
item_id The ID of the user message item. |
|
|
content_index This value is always 0. |
|
|
error The error information. |
response.created
Returned when the server starts generating a new response.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response The response object. |
response.done
Returned after the response is fully generated. The response object includes all output items except raw audio data.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response The response object. |
response.text.delta
Returned when the output modality is text-only and the model generates new text incrementally.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
delta Incremental text generated by the model. |
|
|
response_id The response ID. |
|
|
item_id The message item ID. |
|
|
output_index The index of the output item in the response. This value is always 0. |
|
|
content_index 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
item_id The message item ID. |
|
|
output_index The index of the output item in the response. |
|
|
content_index The index of the output item in the response. |
|
|
text The full text generated by the model. |
response.audio.delta
Returned when the output modality includes audio and the model generates new audio data incrementally.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
item_id The message item ID. |
|
|
output_index The index of the output item in the response. |
|
|
content_index The index of the output item in the response. |
|
|
delta 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
item_id The message item ID. |
|
|
output_index The index of the output item in the response. |
|
|
content_index 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
item_id The message item ID. |
|
|
output_index The index of the output item in the response. |
|
|
content_index The index of the output item in the response. |
|
|
delta 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
item_id The message item ID. |
|
|
output_index The index of the output item in the response. |
|
|
content_index The index of the output item in the response. |
|
|
transcript 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
item_id The message item ID. |
|
|
output_index The index of the output item in the response. |
|
|
call_id The unique ID for this function invocation. This is consistent with the |
|
|
delta 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
item_id The message item ID. |
|
|
output_index The index of the output item in the response. |
|
|
call_id The unique ID for this function invocation. |
|
|
name The name of the function that was called. |
|
|
arguments 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.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
output_index The index of the output item in the response. |
|
|
item Information about the output item. |
response.output_item.done
Returned when an output item is fully generated.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
output_index The index of the output item in the response. |
|
|
item The output item information. |
response.content_part.added
Returned when a new content part is added to an assistant message item during response generation.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
item_id The message item ID. |
|
|
output_index The index of the output item in the response. This value is always 0. |
|
|
content_index The index of the internal part within the output item. This value is always 0. |
|
|
part The output item information. |
response.content_part.done
Returned when streaming of a content part within an assistant message item finishes.
|
event_id A unique identifier for this event. |
|
|
type The event type. This value is always |
|
|
response_id The response ID. |
|
|
item_id The message item ID. |
|
|
output_index The index of the output item in the response. This value is always 0. |
|
|
content_index The index of the content part in the content array. This value is always 0. |
|
|
part The output item information. |