Skip to main content
A session is one continuously generated story. Start it over HTTP, control it over WebSocket, and inspect its final timeline over HTTP.
HTTP responses use the API platform envelope {code, message, data}. The endpoint payload described below is inside data.

Endpoints

Create a session

POST /v1/streaming-world/sessions The endpoint prepares the requested assets and opens a video session. A successful response is 201 Created.

Request fields

string
Public model name. Use vivix-w1-stream. If omitted, the service uses the default public model.
string
required
Initial story setup. Include the setting, characters, tone, visual direction, opening action, and continuity rules in natural language.
array
Named session assets. Each item must use exactly one of file_id or url.
object
Optional visual starting point. Upload the image with POST /v1/files/images first, then pass the returned data.url here. The object contains one url field.
string
16:9, 9:16, or 1:1. Defaults to 16:9.
integer
Maximum video time. Defaults to 600 seconds. The current upper bound is 3600 seconds.
object
Initial application state. Use it for numeric values and structured rules that your client needs to display or update. The object must fit within the request size limit.

Example request

Example response

Get a session

GET /v1/streaming-world/sessions/{session_id} Returns the latest persisted session status. Use it after a reconnect or after session.ended to retrieve the final timeline.

Response fields

The video object is asynchronous. Treat pending and processing as normal intermediate states and only use video.url when it is present.

Stop a session

POST /v1/streaming-world/sessions/{session_id}/stop The request is accepted with HTTP 202.

Immediate stop

Stop with a closing

Use the control channel to observe session.ending and session.ended.

HTTP errors

Use the stable code for program logic. Treat message as display text and do not parse it for routing or retry decisions.