Skip to main content
This page documents the complete LingBot World 2 wire surface: the media track it produces, the session lifecycle, every command you can send, and the messages the model emits back. For what LingBot World 2 is and a quick start, see the overview.

Tracks

The default resolution is 1664 × 960 (960P), and delivered main_video runs at 48 fps. There are no inbound tracks; all client-to-model communication is through commands.

Session lifecycle

Once the connection reaches ready, the session begins in WAITING. start transitions to GENERATING (provided a prompt and a reference image are set); pause moves to PAUSED; resume returns to GENERATING; reset clears state and returns to WAITING from any state. See Sessions for the connection-level lifecycle (disconnected → connecting → waiting → ready) the session passes through first. When all chunk_num chunks of a run complete and the session is still started, the server kicks off the next run on its own, with the same prompt and image. Call reset to stop the loop and re-stage with new conditions.

Commands

Send commands with reactor.sendCommand() on the base SDK, or the typed methods on LingbotWorld2Model / useLingbotWorld2(). The setter commands (set_*) take effect at the next chunk boundary. Below are all available commands:

set_prompt

Set the scene prompt. Valid at any time: call before start to arm generation, or hot-swap during generation to steer the next chunk. Replaces the previously active prompt; applied on the next chunk when generating, otherwise when start fires. Emits prompt_accepted, conditions_ready, and state. Parameters:

set_image

Provide a reference image that anchors generation (image-to-video). Call before start; the image is required for generation to begin. Changes during generation have no effect until reset is issued and start is called again. Upload the file first with uploadFile(), then pass the returned FileRef. Emits image_accepted, conditions_ready, and state, or command_error if the file is missing, not an image, or cannot be decoded. Parameters:

set_seed

RNG seed for the next run. Must be a non-negative integer; the model never draws its own seed. Read once when start fires; later changes take effect only after reset and a new start. Parameters:

set_move_longitudinal

Forward / back camera translation (W / S). One of two independent movement axes; it combines with set_move_lateral, so holding W+A drives diagonally. Persistent state: the value holds across chunks until you send a new one, including "idle". Applies at the next chunk boundary. Parameters:

set_move_lateral

Strafe left / right camera translation (A / D). The second movement axis; combines with set_move_longitudinal for diagonal motion. Persistent state, holding across chunks until changed. Applies at the next chunk boundary. Parameters:

set_look_horizontal

Yaw: rotate the camera to look left / right while held. Persistent state; applies at the next chunk boundary. Rotation speed comes from set_rotation_speed_deg. Parameters:

set_look_vertical

Pitch: look up / down while held. Persistent state; applies at the next chunk boundary. Parameters:

set_rotation_speed_deg

How fast the camera rotates while either look axis is non-idle, in degrees per latent frame. Persistent state; applies at the next chunk boundary. Parameters:

set_camera_pose

A native low-level camera layer: a flat list of per-frame motion deltas, length a multiple of 6, [rx, ry, rz, tx, ty, tz] per frame (small Euler-radian rotation plus translation, in the camera-local frame). This is a velocity profile, not a position path.
  • 6 floats = one delta broadcast to every frame of the chunk (constant velocity).
  • 6 × chunk_size = one delta per latent frame.
  • Any other 6 × k = resampled to the chunk size.
While active, the pose’s rotation overrides look_horizontal / look_vertical, and its translation adds on top of WASD movement. Send an empty list (or omit) to deactivate and hand the camera back to the look axes. Inputs are sanitized (NaN/Inf → 0, rotations clamped to ±π, translation to ±100), so any payload is safe. Keep rotation values small: they are per-frame velocities, so a subtle-looking number compounds over a chunk. Two conventions shape every payload. The vertical axis is y-down: up is negative ty. And each chunk’s translation is max-norm normalized (scaled by the chunk’s largest per-frame norm), so absolute translation magnitude is erased; only the direction and the within-chunk shape survive, which makes a vertical motion’s size its frame count, not its numbers. Rotation is not normalized. The current chunk size is 3 latent frames (about 12 pixel frames).
The pose layer is a bias, not a rig. LingBot is a world model with no ground-truth camera, so pose deltas only condition generation toward motion. If the prompt describes a locked, stationary subject, pose and prompt fight and the subject can drag along. Pair a camera move with a prompt sentence that says the camera moves while the subject stays still.
Parameters:

set_attn_window

Manual override for the DiT self-attention window. By default the model picks the window from motion: still scenes use a small window, moving scenes a large one. Force it when the automatic trigger reads a scene wrong: small locks the still window, large locks the moving window. Applies at the next chunk boundary and can change at any time. Parameters:

set_kv_cache_reset

Set the KV-cache / RoPE reset mode that keeps long sessions in-distribution. The default auto resets the cache on a fixed window (about every 88 latent frames) and honors manual triggers on top; manual turns the periodic reset off but keeps trigger_kv_cache_reset available; off disables all resets, so RoPE positions grow without bound and quality drifts on long runs. Valid at any time; takes effect at the next chunk boundary. When the mode leaves off after the window has grown past the threshold, the first auto chunk resets at once. The reset itself is free at runtime (host-side pointer bookkeeping, no CUDA-graph recapture). Emits state. Parameters:

trigger_kv_cache_reset

Force a one-shot KV-cache / RoPE reset on the next chunk, without waiting for the periodic window to fill. Use it at a hard scene or prompt cut to flush stale context. Honored in auto and manual modes; rejected with command_error while the mode is off. Takes no arguments. Emits state on success.

start

Begin generating video on main_video. Requires both a prompt (via set_prompt) and a reference image (via set_image); fails with command_error otherwise. Emits generation_started and state. No effect while already generating.

pause

Halt after the current chunk finishes (emits generation_paused). Valid only while generating.

resume

Continue from the next chunk (emits generation_resumed). Valid only while paused.

reset

Abort the run, clear the active prompt and reference image, and return to WAITING from any state. After reset, call set_prompt and set_image again before start. Emits generation_reset and state. The lifecycle commands take no arguments:

Messages

LingBot World 2 emits the following messages. Every message is delivered as JSON { "type": "<name>", "data": { … } }.

state payload

state is the single source of truth for driving UI. Subscribe once and treat it as the authoritative session snapshot; you generally do not need to track individual commands and chunk_complete events yourself. Example handler:

Complete example

Stage a reference image and prompt, wait for the image to decode, start, then drive the camera.