Forward compatibility. Vivix may add event types, fields, and enum values over time. Ignore values you do not recognize, retain the fields you need, and use the Session capabilities to decide which optional operations are available.
Common envelope
string
Server-generated unique identifier for this message.
string
Event discriminator, such as
session.ready or event.applied.integer
Monotonically increasing position in this Session’s server-event stream.
integer
Unix timestamp in milliseconds when the server created the event.
optional string
The client event_id that caused this message, when the event is a direct result of a client command.
Two different identifiers.
event_id identifies this server message. request_event_id correlates it with a client command. world_event_id, used by the domain Event lifecycle below, identifies the durable steering intent created by event.create.Ordering and reconnects
Process messages in ascendingsequence order. A gap means the client no longer has a complete live view, but sequence is not a replay cursor. After a control connection reconnects, the service sends session.snapshot instead of replaying missed messages. Treat the snapshot sequence as the new baseline.
A snapshot is a compact control-state view, not a transcript or a semantic description of everything that has happened in the world. Applications that need a durable audit trail should persist events while the connection is live.
Which event should I listen to?
- Session:
session.ready,session.snapshot,session.closing,session.closed - World Event:
event.accepted,event.applied,event.superseded,event.cancelled,event.failed - Media:
media.state.updated - Caption:
caption.delta,caption.completed - Usage:
usage.updated - Error:
error
Session Events
Connection readiness, reconnect state, and terminal Session transitions.session.ready
Emitted once after a new control connection is established and the Session can accept client events. A reconnect receivessession.snapshot instead.
"session.ready"
Event type.
object
Current Session identity and state.
object
Current outgoing media state.
session.ready
session.snapshot
Emitted after a control connection reconnects. It supplies the current control baseline; events missed while disconnected are not replayed."session.snapshot"
Event type.
object
Current Session identity and state.
object
Current outgoing media state.
object
Current World Event pointers.
Snapshot only. Use this state to resume control. Do not infer the missing lifecycle or caption messages from the pointer values.
session.snapshot
session.closing
Emitted when shutdown has begun. Stop sending new client events and continue reading untilsession.closed or the connection ends.
"session.closing"
Event type.
string
Session being closed.
string
Shutdown reason, such as
client_request, idle_limit, or service_shutdown.session.closing
session.closed
Emitted when the Session reaches its terminal state. No further client event can affect this Session. The final cumulative usage is included for reconciliation."session.closed"
Event type.
string
Closed Session identifier.
string
Terminal shutdown reason.
object
Final cumulative generated media usage.
session.closed
World Event Lifecycle
These messages describe the lifecycle of the domain Event submitted withevent.create. They use world_event_id so the domain identifier cannot be confused with the common-envelope event_id.
There is no event.completed. A World Event is an open-ended steering intent. Its influence may continue until newer steering takes over, so semantic completion would be misleading.
event.accepted
Emitted afterevent.create passes validation and admission. The service has taken responsibility for processing the World Event, but outgoing media has not necessarily changed.
"event.accepted"
Event type.
string
The event_id of the accepted event.create client message.
string
Server-assigned identifier for the World Event.
event.accepted
event.applied
Emitted when the first media causally influenced by the World Event enters the server-side outgoing media path. This is the earliest stable application boundary exposed by the API.What applied does not mean. It does not confirm that a viewer rendered the media, that every requested development occurred, or that the Event stopped influencing the world.
"event.applied"
Event type.
string
The event_id of the event.create client message.
string
World Event that first affected outgoing media.
object
Server-observed application boundary.
event.applied
event.superseded
Emitted when a newer World Event takes over the active steering frontier. If the older Event was already applied, its published consequences remain part of Session history.No rollback. Superseding changes the unpublished future. It does not withdraw published media, erase established continuity, or make the world forget prior consequences.
"event.superseded"
Event type.
string
The event_id of the newer client command that caused the transition.
string
World Event that lost the active frontier.
string
Newer World Event that took over steering.
boolean
Whether the superseded World Event had already crossed its application boundary.
object
Boundary where newer steering took over.
event.superseded
event.cancelled
Emitted whenevent.cancel successfully removes a pending, unapplied World Event. Cancellation is available only when the Session advertises the corresponding capability.
Applied Events cannot be cancelled. Once influence has entered outgoing media, send a newer World Event to redirect what happens next.
"event.cancelled"
Event type.
string
The event_id of the successful event.cancel client message.
string
World Event removed before application.
event.cancelled
event.failed
Emitted when an accepted World Event cannot reach its application boundary. Validation and admission failures that occur before a World Event exists use the genericerror event instead.
After event.applied, later Session or media problems are reported through media.state.updated or error; they do not retroactively fail the World Event.
"event.failed"
Event type.
string
The event_id of the original event.create client message.
string
Accepted World Event that could not be applied.
object
Structured error details.
event.failed
Media Events
State transitions for the Session’s outgoing media.media.state.updated
Emitted when outgoing media changes state. A transition caused bysession.hold or session.resume includes the triggering request_event_id; autonomous transitions may omit it.
"media.state.updated"
Event type.
object
Updated media state.
media.state.updated
Caption Events
Incremental and final caption text aligned to Session media time.caption.delta
Emitted as caption text becomes available. Append deltas with the samecaption_id in sequence order to render low-latency text.
"caption.delta"
Event type.
string
Identifier shared by all messages for this caption.
string
Text fragment to append.
integer
Approximate Session media time at which the caption begins.
caption.delta
caption.completed
Emitted with the authoritative final text for a caption. Replace any locally assembled deltas for the samecaption_id with text.
"caption.completed"
Event type.
string
Completed caption identifier.
string
Authoritative final caption text.
integer
Approximate Session media start time for the caption.
integer
Approximate Session media end time for the caption.
caption.completed
Usage Events
Cumulative generated-media usage for metering and live cost displays.usage.updated
Emitted periodically as generated-media usage changes. Values are cumulative for the Session and may grow independently. Replace the previous totals; do not add updates together."usage.updated"
Event type.
object
Current cumulative generated-media usage.
usage.updated
Error Events
Request-level and Session-level errors that do not belong to an accepted World Event.error
Emitted when client validation, Session control, or service processing fails. Most errors do not close the Session. If an accepted World Event specifically fails before application, the service emitsevent.failed instead.
"error"
Event type.
optional string
The client event_id that caused the error, when applicable.
object
Structured error details.
error