Skip to main content
Streaming World lets an application start a continuously generated story and steer what happens next while the video is playing. You use three public surfaces:

Start with one session

A session contains one continuous story. Create it with a natural-language setup, then keep the returned id and control object.
1

Upload the image material

Upload an image to your workspace first. Keep both file_id and url from the response. The file_id is used for named assets; the returned url is used by opening_image.
For an audio asset, use the matching upload endpoint and keep the returned file_id:
2

Create the session

3

Connect the control channel

Use the control.url and the session-specific control.client_secret to open the WebSocket. The secret is only for this session; keep it private.
4

Load the player

Wait for session.ready. Its playback.url is an HLS address. Give that URL to an HLS-capable player and start playback.

Create request

Generation details are selected by the service. There is no public inference-parameter object in this API.

References and opening images

An opening image answers “where should the story begin visually?” A named asset answers “which image or sound should later story segments refer to?” They are different inputs and can be used together. Assets can be registered before the first frame or added during playback. A session asset pool may be larger than the number of references used in one generated segment. The service selects the references needed for each segment; applications should use stable names and descriptions so the story can refer to them naturally. Each asset uses exactly one source: The public response contains an opaque asset_id, name, and type. It does not return source URLs or storage details.

Initial state and numeric rules

Use state for values that your application needs to display or enforce. For example, a fighting game can start with both characters at 100 health points, then attach a state update to an instruction that describes a hit. The service sends the full current state in every state.updated event. Your client can replace its local copy with that object instead of trying to reconstruct state from individual changes.
The state object is application data. The service does not infer your schema. If you use hp, keep the path and value type consistent in every update.

Response

Successful creation returns HTTP 201:

What happens next

  1. The service prepares the opening media.
  2. The control channel emits session.ready with an HLS playback URL.
  3. Your client starts the player and listens for instruction and state events.
  4. New instructions affect future story content; already published video is not rewritten.
Continue with Streaming Control, or use the complete Sessions reference.

Complete example