Resource model
A Session is the only top-level REST resource. The other types below are session-scoped inputs or connection records, not separate REST collections.References are reusable anchors. A Reference has no fixed semantic category. For example, a Reference named A can combine a portrait, an audio sample, and a short description. Events can then use A as a stable conditioning anchor.
REST workflow
- Create a Session with
POST /v1/streaming-world/sessionsand save itssession_id. - Read the returned
capabilitiesbefore enabling runtime controls or sending Event content. - Pass the opaque
controlandmediadescriptors to the Vivix client. - Use
GET /v1/streaming-world/sessions/{session_id}to recover the current operational snapshot after reconnecting. - Issue fresh descriptors with
POST /v1/streaming-world/sessions/{session_id}/client-secretswhen client credentials expire. - Close the Session with
POST /v1/streaming-world/sessions/{session_id}/close.
Response envelope. All REST responses use
{code, message, data}. code = 0 means success; a non-zero code means failure. The fields below refer to values inside data.Create Session
Creates a Streaming World Session and returns its effective configuration, capability contract, and initial client connection descriptors. POST/v1/streaming-world/sessions
Body Parameters
string
required
Model to run. Use
vivix-w1-stream.string
Client-generated key that prevents duplicate Session allocation. Reuse the same key and identical body after a timeout, HTTP 429, or 5xx response.
object
required
Persistent creative context that establishes the experience before generation starts.
object
A visual starting point for continuous generation.
array
Named multimodal anchors available throughout the Session.
object
Requested continuous output settings.
object
Optional realtime input accepted from an authorized client.
object
Controls when generation begins and how long it may continue without new guidance.
integer
Requested maximum Session lifetime. The effective expiry can be lower and is returned by the server.
object
Application-defined string keys and values. Metadata is returned with the Session and is not interpreted as generation input.
Content Blocks
Content arrays are ordered. Checkcapabilities.event_content_types and capabilities.reference_content_types before using a block type at runtime or in a Reference.
object
Natural-language context or guidance.
object
An image included in a Reference.
object
An audio sample included in a Reference.
Returns
string
Stable identifier for the Session.
string enum
One of
provisioning, active, or failed at create time.object
Opaque descriptor for the Session control connection.
object
Opaque descriptor used by the Vivix client to connect continuous media.
object
Effective output settings, including
aspect_ratio, resolution, fps, and captions.object
Effective feature contract for this allocated Session.
object
Latest operational snapshot, including media status, media time, and applied or pending world Event ids.
timestamp
Session creation time.
timestamp
Time after which the Session can no longer be used.
Request
Response
Capability negotiation
Capabilities are resolved after Vivix validates and allocates the Session. Treat the returned object as the authoritative feature contract rather than assuming that every model or deployment accepts the same inputs.Get Session
Retrieves lifecycle status, effective configuration, capabilities, and the latest operational snapshot. Use it after reconnecting or while waiting for closure. GET/v1/streaming-world/sessions/{session_id}
Path Parameters
string
required
Identifier of the Session to retrieve.
Returns
Returns the effective Session object. For security, Get Session never returns either client_secret. Use Create Client Secret when a client needs new credentials.string enum
One of
provisioning, active, closing, closed, or failed.string enum
One of
connecting, running, held, stalled, disconnected, or failed.integer
Latest server-side media time in milliseconds.
optional string
Most recent world Event known to be influencing published media.
optional string
Newest accepted world Event that has not yet taken effect.
integer
Latest control-event sequence included in this snapshot.
Request
Response
Create Client Secret
Issues fresh, short-lived control and media descriptors for an active Session. Call this endpoint from a trusted server and return only the descriptors to the authorized client. POST/v1/streaming-world/sessions/{session_id}/client-secrets
Path Parameters
string
required
Identifier of the active Session.
Body Parameters
string
Client-generated key that makes credential issuance safe to retry.
Returns
string
Identifier of the Session.
object
Fresh opaque descriptor containing
url, client_secret, and expires_at.object
Fresh opaque descriptor containing
url, client_secret, and expires_at.Request
Response
Close Session
Stops accepting new Events and begins asynchronous cleanup. Media already published to a client is not withdrawn. Repeating the request with the same idempotency key is safe. POST/v1/streaming-world/sessions/{session_id}/close
Path Parameters
string
required
Identifier of the Session to close.
Body Parameters
string
Client-generated key that makes the close request safe to retry.
Returns
string
Identifier of the closing Session.
string enum
closing while cleanup is in progress or closed if cleanup has already completed.Request
Response
Session status
Session error cases
Error responses use the same
{code, message, data} envelope. A non-zero code indicates failure, and message contains an English description.