Skip to main content
Streaming World Guide one continuous realtime world with open-ended Events. Your application controls intent, continuity, and whether the world advances; Vivix plans the dialogue, movement, reactions, timing, and presentation together.

Connect control and media

Create a Streaming World Session first, then use the returned control and media descriptors as opaque connection details. Connect the media descriptor with the Vivix realtime media client and connect the WSS control channel with control.url and control.client_secret. Do not infer or hardcode an underlying media transport.
  1. Read the Session capabilities and expose only the controls supported by that Session.
  2. Connect the opaque media descriptor and begin rendering the continuous output.
  3. Connect WSS. A new connection receives session.ready; a reconnect receives session.snapshot instead.
  4. Send client events with a stable, client-generated event_id and wait for the corresponding server lifecycle event.

Control the world with Events

event.create guides the unpublished future of the running world. An Event is still prompt-shaped: describe the experience you want as one coherent, open-ended intent. Do not split speech and behavior into separate speaker turns, dialogue lines, actions, beats, scenes, or other orchestration objects.
Keep multi-character interaction natural. Name the relevant references, describe the dramatic or interactive direction, and let Vivix decide how many turns, pauses, reactions, and movements are needed.
event.create

Interpret Event lifecycle messages

There is no event.completed lifecycle message. An Event can influence a continuous world long after its first visible effect, so it has no reliable semantic completion boundary.

Redirect, hold, and resume

Redirect with a newer Event. Send another event.create when the user or application should change what happens next. The default steer handling preserves committed media and redirects the unpublished future at a safe boundary. Cancel only when supported. Check capabilities.event_cancel before sending event.cancel. Once an Event has been applied, its influence is part of media history; send a newer Event instead of trying to roll it back. Hold without closing. Send session.hold to stop new world progression at a safe media boundary while preserving Session continuity and the last available visual output. Resume the same world. Send session.resume and wait for media.state.updated. Creating a new Event while held also requests an implicit resume. Redirecting, cancelling, or holding never retracts media that has already been committed, published, or buffered by a client.

Maintain application state from server events

  • Reconnect. Use session.snapshot as the new operational baseline. Events missed while disconnected are not replayed, and the snapshot is not an authoritative semantic description of the generated world.
  • Ordering. Process live events in sequence order and use gaps as a connection-health signal, not as evidence about world semantics.
  • Captions. Append caption.delta fragments by caption id, then replace the assembled text with the authoritative caption.completed value.
  • Usage. Treat usage.updated as a cumulative application-level view of generated audio and video usage.
  • Media. Drive loading, running, held, stalled, and recovery UI from media.state.updated without depending on transport implementation details.

Recommended event flow

Media, caption, and usage messages can interleave with Event lifecycle messages. Reduce them in server sequence order instead of waiting for one fixed global ordering.
API Reference. This guide explains the control model. For complete schemas, see Sessions, Client events, and Server events.