control.url, which points to /v1/realtime-avatar/control). Each event includes an event_id and a type. Error events may also include the client event_id that caused the failure.
Forward compatibility. Vivix may add new event types and fields over time. Clients must ignore any event type or field they do not recognize and must not disconnect on unknown data.
1. Which event should I listen to?
Know a response was accepted and has an id. · Listen to:response.created
Show live text or captions. · Listen to: response.output_text.delta
Show final text for a streamed text item. · Listen to: response.output_text.done
Receive the final output item, including completed function calls. · Listen to: response.output_item.done
Check final response status. · Listen to: response.done
Track when avatar media starts or stops rendering over RTC. · Listen to: response.render.started and response.render.stopped
Track user speech activity and transcription. · Listen to: input_audio.speech_started, input_audio.speech_stopped, and conversation.item.input_audio_transcription.*
2. Error Events
error
Emitted when client or server processing fails. Most errors are recoverable and do not close the session. error: object Error details.error.message: string
Human-readable error message.
error.type: string
The type of error, such as invalid_request_error or server_error.
error.code: optional string
Machine-readable error code, when available.
error.event_id: optional string
Client event id that caused the error, when applicable.
error.param: optional string
Request parameter related to the error, when applicable.
event_id: string
Server-generated unique event id.
type: “error”
Event type. Must be error.
error
3. Session Events
session.closed
When a session closes, the service attempts to send this event before disconnecting the remaining control connections. When received, stop sending controls and clean up local media. Do not rely on this event alone: it may be missed if the connection has already closed. It means realtime interaction has ended, but asynchronous resource cleanup may still be in progress. Use Get Session for authoritative lifecycle state.
event_id: string
type: “session.closed”
session_id: string
reason: string
session.closed
session.updated
media_transport · optional string. The current video transport, when returned.
media · optional object. Use the updated connection details when present. See Sessions API for the transport-specific shape.
Emitted after a requested session.update is applied. Returns the effective mutable session state.
event_id: string
The effective update request ID: the client event ID when supplied, otherwise generated by the server.
type: “session.updated”
Event type. Must be session.updated.
session: object
Effective mutable session state after the update is applied.
session.mode: string
Effective session mode, one of text_chat or video_avatar.
session.active_avatar_id: string
Avatar whose instructions apply by default for later responses.
session.source_image_id: nullable string
Effective source image for avatar video. Returns null in text_chat mode.
session.updated
session.update.done
The terminal result for an accepted session.update. Correlate it with request_event_id. session.updated acknowledges the update; it does not replace the completion result.
event_id · string, server event ID.type · always session.update.done.request_event_id · string, original request ID.status · string. One of completed, cancelled, or failed.reason · optional string for cancelled or failed results, such as superseded or session_shutdown.
error; do not keep waiting for completion. session.update.done is not retained or replayed.
session.bootstrap.opening.done
The bootstrap terminal event may replay to a new control connection. session.update.done is not retained or replayed. There is no guaranteed global order between these event types. Handle unfamiliar reasons without failing.
The terminal result for the opening.
event_id · string, server-generated event ID.
type · always session.bootstrap.opening.done.
status · completed, cancelled, or failed.
reason · optional string, present only for cancelled or failed results, such as superseded or session_shutdown.
4. Registry Events
asset.added
Confirms that an asset.add event was accepted and that the registered asset ids are available for later response.script calls.
event_id: string
Unique id for this server event.
type: “asset.added”
Event type. Must be asset.added.
assets: object
Assets registered by the accepted event.
assets.images: optional array
Registered image assets.
assets.audio: optional array
Registered audio assets.
assets.speech_text: optional array
Registered speech text assets.
assets.visual_prompts: optional array
Registered visual prompt assets.
asset.added
avatar.added
Confirms that an avatar.add event was accepted and that the new avatars are available to select with session.update.
event_id: string
Unique id for this server event.
type: “avatar.added”
Event type. Must be avatar.added.
avatars: array
Avatars registered by the accepted event.
avatars[].avatar_id: string
Registered avatar id.
avatars[].instructions, voice, visual: optional fields
Effective avatar definition accepted by the service.
avatar.added
5. Conversation Events
conversation.item.created
Reports a new conversation item created by the client or by response generation.
event_id: string
Unique id for this server event.
type: “conversation.item.created”
Event type. Must be conversation.item.created.
previous_item_id: nullable string
Conversation item that precedes this item. Returns null when the item has no predecessor.
item: object
The created Conversation Item. Uses the same item shape documented in conversation.item.create.
id: string
Server-assigned or client-provided conversation item identifier.
type: string enum
Item type, such as message, function_call, or function_call_output.
role, content, call_id, name, arguments, output: conditional fields
Fields depend on the item type. See the item schema in conversation.item.create.
status: optional string enum
Optional item status, when returned by the service.
conversation.item.created
conversation.item.retrieved
Returns the item requested with conversation.item.retrieve.
event_id: string
Unique id for this server event.
type: “conversation.item.retrieved”
Event type. Must be conversation.item.retrieved.
item: object
The requested Conversation Item. Uses the same item shape documented in conversation.item.create.
id: string
Server-assigned or client-provided conversation item identifier.
type: string enum
Item type, such as message, function_call, or function_call_output.
role, content, call_id, name, arguments, output: conditional fields
Fields depend on the item type. See the item schema in conversation.item.create.
status: optional string enum
Optional item status, when returned by the service.
conversation.item.retrieved
conversation.item.deleted
Confirms that a conversation item was deleted.
event_id: string
Unique id for this server event.
type: “conversation.item.deleted”
Event type. Must be conversation.item.deleted.
item_id: string
Identifier of the deleted conversation item.
conversation.item.deleted
6. Audio Events
input_audio.speech_started
Emitted when the service detects user speech on the input audio stream. This can arrive before any transcription text is available.
event_id: string
Unique id for this server event.
type: “input_audio.speech_started”
Event type. Must be input_audio.speech_started.
item_id: string
Provisional user audio item id used to correlate later transcription events and the created conversation item.
audio_start_ms: integer
Speech start time in milliseconds on the session input-audio timeline.
input_audio.speech_started
input_audio.speech_stopped
Emitted when the service detects that user speech has stopped. This can arrive before transcription completes or fails.
event_id: string
Unique id for this server event.
type: “input_audio.speech_stopped”
Event type. Must be input_audio.speech_stopped.
item_id: string
Provisional user audio item id used to correlate later transcription events and the created conversation item.
audio_end_ms: integer
Speech stop time in milliseconds on the session input-audio timeline.
input_audio.speech_stopped
7. Transcription Events
conversation.item.input_audio_transcription.delta
Streams partial transcription text for a user audio item when transcription is enabled.
event_id: string
Unique id for this server event.
type: “conversation.item.input_audio_transcription.delta”
Event type. Must be conversation.item.input_audio_transcription.delta.
item_id: string
User audio conversation item being transcribed.
content_index: optional integer
Index of the audio content part.
delta: optional string
Incremental transcript text.
conversation.item.input_audio_transcription.delta
conversation.item.input_audio_transcription.completed
Returns the final transcription for a user audio item.
event_id: string
Unique id for this server event.
type: “conversation.item.input_audio_transcription.completed”
Event type. Must be conversation.item.input_audio_transcription.completed.
item_id: string
User audio conversation item that was transcribed.
content_index: integer
Index of the audio content part.
transcript: string
Final transcript text.
conversation.item.input_audio_transcription.completed
conversation.item.input_audio_transcription.failed
Reports that transcription failed for a specific user audio item.
event_id: string
Unique id for this server event.
type: “conversation.item.input_audio_transcription.failed”
Event type. Must be conversation.item.input_audio_transcription.failed.
item_id: string
User audio conversation item that failed transcription.
content_index: integer
Index of the audio content part that failed transcription.
error: object
Transcription error details.
error.type: string
Type of transcription error.
error.code: optional string
Machine-readable transcription error code, when available.
error.message: string
Human-readable transcription error message.
error.param: optional string
Request parameter related to the error, when applicable.
conversation.item.input_audio_transcription.failed
8. Response Events
Lifecycle distinction.response.created and response.done describe the response resource and logical output stream. response.render.started and response.render.stopped describe visible or audible avatar rendering over RTC. response.render.stopped is emitted before response.done for responses that enter avatar rendering. Responses that do not render, such as tool-call-only responses, proceed directly to response.done.
response.created
request_event_id · optional string. Correlates the client’s response.create when it supplied a nonempty event_id.
Returned when a new Response is created. This is the first event of response creation, where the response is in an initial state of in_progress.
event_id: string
The unique ID of the server event.
type: “response.created”
Event type. Must be response.created.
response: realtime_response
The response resource.
response.id: optional string
The unique ID of the response.
response.status: optional string
The response status. One of in_progress, completed, cancelled, failed, or incomplete.
response.status_details: optional object or null
Additional details about the response status.
response.output: optional array<conversation_item>
The output conversation_items generated by the response.
response.max_output_tokens: optional number or “inf”
The maximum number of output tokens for the response.
response.created
response.done
Returned when a Response reaches its final state. Always emitted regardless of the final state and, when avatar rendering occurred, only after response.render.stopped. The response includes all generated output items and omits raw audio data.
event_id: string
The unique ID of the server event.
type: “response.done”
Event type. Must be response.done.
response: realtime_response
The response resource.
response.id: optional string
The unique ID of the response.
response.status: optional string
The final response status. Clients should check this field for completed, cancelled, failed, or incomplete.
response.status_details: optional object or null
Additional details about the response status.
response.output: optional array<conversation_item>
All output conversation_items generated during the response. Raw audio/video is delivered over RTC media tracks and is not included here.
response.max_output_tokens: optional number or “inf”
The maximum number of output tokens for the response.
response.done
response.render.started
Returned when avatar output attributable to a response starts rendering over RTC. This can be model-generated avatar output, scripted speech or audio, or a visual-only scripted action.
event_id: string
The unique ID of the server event.
type: “response.render.started”
Event type. Must be response.render.started.
response_id: string
The response whose avatar output started rendering.
response.render.started
response.render.stopped
Returned when avatar output attributable to a response is no longer rendering over RTC. The final response.done event follows with the completed response resource and final status.
event_id: string
The unique ID of the server event.
type: “response.render.stopped”
Event type. Must be response.render.stopped.
response_id: string
The response whose avatar output stopped rendering.
status: string enum
Render stop reason. One of completed, cancelled, interrupted, or failed.
response.render.stopped
response.output_item.done
Returned when an item is done streaming. Also emitted when a response is interrupted, incomplete, or cancelled.
event_id: string
The unique ID of the server event.
type: “response.output_item.done”
Event type. Must be response.output_item.done.
response_id: string
The ID of the response to which the item belongs.
output_index: number
The index of the output item in the response.
item: conversation_item
The item that is done.
id: string
The unique ID of the item.
type: string
The item type.
status: optional “completed” or “incomplete” or “in_progress”
The status of the item.
role: optional string
Message role, when the output item is a message.
content: optional array
Final message content, when the output item is a message.
call_id: optional string
The ID of the function call, when the output item is a function call.
name: optional string
The function name, when the output item is a function call.
arguments: optional string
The final function arguments as a JSON string, when the output item is a function call.
response.output_item.done
response.output_item.done function call
response.output_text.delta
Streams incremental assistant text output, including text associated with spoken RTC media. The first delta for an item_id and output_index implicitly introduces that streamed text item.
event_id: string
Unique id for this server event.
type: “response.output_text.delta”
Event type. Must be response.output_text.delta.
response_id: string
The ID of the response.
item_id: string
The ID of the message item receiving text. If the client has not seen this item before, create it from this event and finalize it with response.output_item.done.
output_index: number
The index of the output item in the response.
delta: string
Incremental text.
response.output_text.delta
response.output_text.done
Returns final assistant text output, including text associated with spoken RTC media.
event_id: string
Unique id for this server event.
type: “response.output_text.done”
Event type. Must be response.output_text.done.
response_id: string
The ID of the response.
item_id: string
The ID of the message item.
output_index: number
The index of the output item in the response.
text: string
Final text.
response.output_text.done