reactor.sendCommand(), the events the model emits back, and an end-to-end example. For the
conceptual model and a quick start, see the overview.
LongLive-2.0 outputs a single video track, main_video, in chunks of 29 frames (~1.2s at
24fps). Transitions take effect on chunk boundaries. See
Chunks, scenes, and length for
how the per-scene 48-chunk budget and the cumulative session_chunk clock work.
Commands
Send commands to the model usingreactor.sendCommand(). Below are all available commands:
- set_shot
- scene_cut
- schedule_shot
- schedule_scene_cut
- start / pause / resume / reset
- set_seed
set_shot
Set the opening shot beforestart, or queue a soft shot change mid-stream. A shot keeps the
scene’s attention memory (the “sink tokens”) and continuity, swapping the prompt conditioning.
Use it for a new beat within the same world (a camera move, an action, a time skip). Mid-stream it
activates at the next chunk boundary and spends from the current scene’s 48-chunk budget.Acknowledged by shot_set; rejected with command_error if the prompt is empty.Parameters:Example:
Messages from model
The model emits these events. Subscribe withreactor.on("message", ...) (or the generated React
hooks). Every message is delivered as JSON { "type": "<name>", "data": { … } }.
state payload
state is the single source of truth for the session’s observable state. Subscribe once and treat
it as the authoritative session snapshot; you generally do not need to track individual command
acknowledgements and chunk_complete events yourself.