WebSocket server reference
The server sends these events over the WebSocket connection.
Sent when a client-side or server-side error occurs.
Sent immediately after the client connects. Contains the default session configuration.
Sent after the server processes a
Sent after the server receives an
Sent after the server receives an
Sent after the server receives an
Sent when a new output item is ready.
Sent when a new content part is ready.
Sent when the model generates an audio chunk.
Sent when a content part is complete.
Sent when an output item is complete.
Sent when audio generation is complete.
Sent when response generation is complete. The
Sent when all responses have been generated.
Reference: Realtime streaming TTS.
error
Sent when a client-side or server-side error occurs.
Example
string
body
Event ID.
string
body
Always
error.object
body
Error details.
session.created
Sent immediately after the client connects. Contains the default session configuration.
Example
string
body
Event ID.
string
body
Always
session.created.object
body
Session configuration.
session.updated
Sent after the server processes a session.update request. On error, the server sends an error event instead.
Example
string
body
Event ID.
string
body
Always
session.updated.object
body
Session configuration.
input_text_buffer.committed
Sent after the server receives an input_text_buffer.commit event.
Example
string
body
Event ID.
string
body
Always
input_text_buffer.committed.string
body
ID of the user message item to create.
input_text_buffer.cleared
Sent after the server receives an input_text_buffer.clear event.
Example
string
body
Event ID.
string
body
Always
input_text_buffer.cleared.response.created
Sent after the server receives an input_text_buffer.commit event.
Example
string
body
Event ID.
string
body
Always
response.created.object
body
Response details.
response.output_item.added
Sent when a new output item is ready.
Example
string
body
Event ID.
string
body
Always
response.output_item.added.string
body
Response ID.
integer
body
Response output item index. Always
0.object
body
Output item details.
response.content_part.added
Sent when a new content part is ready.
Example
string
body
Event ID.
string
body
Always
response.content_part.added.string
body
Response ID.
string
body
Message item ID.
integer
body
Response output item index. Always
0.integer
body
Content part index. Always
0.object
body
Completed content part.
response.audio.delta
Sent when the model generates an audio chunk.
Example
string
body
Event ID.
string
body
Always
response.audio.delta.string
body
Response ID.
string
body
Message item ID.
integer
body
Response output item index. Always
0.integer
body
Content part index. Always
0.string
body
Base64-encoded audio data chunk.
response.content_part.done
Sent when a content part is complete.
Example
string
body
Event ID.
string
body
Always
response.content_part.done.string
body
Response ID.
string
body
Message item ID.
integer
body
Response output item index. Always
0.integer
body
Content part index. Always
0.object
body
Completed content part.
response.output_item.done
Sent when an output item is complete.
Example
string
body
Event ID.
string
body
Always
response.output_item.done.string
body
Response ID.
integer
body
Response output item index. Always
0.object
body
Output item details.
response.audio.done
Sent when audio generation is complete.
Example
string
body
Event ID.
string
body
Always
response.audio.done.string
body
Response ID.
string
body
Message item ID.
integer
body
Response output item index. Always
0.integer
body
Content part index. Always
0.response.done
Sent when response generation is complete. The response object includes all output items but excludes raw audio data already sent.
- Qwen3-TTS Realtime
- Qwen-TTS Realtime
Example
string
body
Event ID.
string
body
Always
response.done.string
body
Response ID.
object
body
Response details.
session.finished
Sent when all responses have been generated.
Example
string
body
Event ID.
string
body
Always
session.finished.