Skip to main content
This page documents the complete Helios wire surface: every command you send with reactor.sendCommand(), the events the model emits back, and three end-to-end examples. For the conceptual model and a quick start, see the overview.

Commands

Send commands to the model using reactor.sendCommand(). Below are all available commands:

set_prompt

Convenience wrapper around schedule_prompt that automatically picks the right chunk index so you don’t have to track it yourself:
  • Not started: schedules at chunk 0.
  • Paused: schedules at the current chunk (takes effect on resume).
  • Running: schedules at the next chunk (current chunk is already being processed).
The easiest way to change the prompt. Call set_prompt and the model figures out when to apply it. Parameters: Example:

schedule_prompt

Schedule a prompt to be applied at a specific chunk index during video generation. Parameters: Behavior:
  • Scheduling a prompt at a chunk that already has a prompt overwrites it.
  • At each chunk boundary the model applies the latest prompt scheduled at or before the current chunk, and discards the earlier ones it skipped past.
  • Scheduling for a chunk that has already passed is not an error. The prompt is due immediately, so it applies on the next chunk.
  • Schedule a prompt at chunk 0 before calling start, so the first chunk has something to generate from.
  • Prompts can be scheduled while generation is running for real-time control.
Example:

set_image

Set or change the reference image for image-to-video conditioning. Can be called before or during generation. Upload the image first with uploadFile(), then pass the returned FileRef as the image parameter. See File Uploads for more details. Parameters: Behavior:
  • Can be set before starting or while generation is running.
  • Helios center-crops the image to its 5:3 aspect ratio, then resizes it to its native 640×384 generation resolution. The image_accepted message echoes the resulting dimensions. Displayed frames are larger whenever super-resolution is on.
  • Swapping the image mid-generation is an immediate switch on the next chunk; the previous image’s history conditioning is not blended out.
  • A missing file, a non-image MIME type, or bytes that fail to decode produce command_error and leave the session unchanged.
Example:

set_conditioning

Set the prompt and reference image in a single atomic message (Helios SDK 0.9.0+). Use it when both are known at once (e.g. launching a curated scene): the two ride one data-channel message, so the first chunk is generated with the image already in place. Sending set_image and set_prompt separately before start races, and the image can land a chunk late. Upload the image first with uploadFile(), then pass the returned FileRef as image. See set_image for upload details. Parameters: Example:

set_image_strength

Adjust how strongly the reference image anchors generation. Ignored when no reference image is set. Parameters: Behavior:
  • The current chunk loop snapshots image_strength together with the reference image. A new value sent on its own is stored but is not applied until the reference image is next set (via set_image or set_conditioning), or until generation is restarted with reset + start.
  • Set image_strength immediately before set_image / set_conditioning if you want it to take effect on the next chunk.
Example:

set_sr_scale

Set the super-resolution factor applied to each emitted frame. Takes effect on the next chunk. Parameters: Helios generates at 640×384 and upscales from there, so the default "2x" puts 1280×768 frames on the main_video track. Super-resolution changes the frames you receive, not the resolution the model reasons about. Example:

set_seed

Set a seed for reproducible output. Using the same seed with the same prompts will produce the same video. Parameters: Behavior:
  • The model reads the seed once, when generation begins. Set it before start.
  • Changing the seed mid-run has no effect on the current run. It applies to the next run, after reset and a new start.
Example:

start

Begin the video generation process. Parameters: None. Requirements:
  • At least one prompt must be scheduled before calling this command, via set_prompt, schedule_prompt, or set_conditioning. With an empty schedule, start emits command_error with the reason No prompt set. Call set_prompt first.
  • Schedule that prompt at chunk 0. The precondition check accepts a prompt at any chunk index, but generation begins at chunk 0 and needs a prompt that is due there. Both set_prompt and set_conditioning target chunk 0 before generation starts.
Example:

pause

Pause the video generation after the current chunk finishes processing. The model retains its full state including history buffers. Parameters: None. Example:

resume

Resume video generation from where it was paused. Parameters: None. Example:

reset

Stop generation and reset the model to its initial state. Parameters: None. Effects:
  • Halts any ongoing generation.
  • Clears all scheduled prompts, history buffers, and the active reference image.
  • Empties the rewind buffer and restarts snapshot_index at 1, so indices saved before the reset collide with indices saved after it. Discard any snapshot list your app is holding.
  • Returns the model to a clean state ready for new prompts. The currently configured seed is preserved; call set_seed after reset if you want to change it.
Example:

save_snapshot

Capture the current world state into the rewind buffer. Saving a snapshot marks a moment you can return to later with rewind. Parameters: Behavior:
  • The buffer holds up to 50 snapshots. Saving beyond that evicts the oldest. There is no command for deleting a snapshot or for resizing the buffer.
  • Each snapshot is assigned a snapshot_index, a counter that starts at 1 and never reuses a value. Pass that value to rewind to target this snapshot. An evicted index cannot be rewound to.
  • The new snapshot descends from whatever current_snapshot_id names, and becomes current_snapshot_id itself. Saving after a rewind therefore branches off the restored snapshot, and saving without one extends the branch already in progress.
  • The buffer belongs to the session. It starts empty, reset empties it, and it is released when the session ends.
  • Generation must be running. Before start, the command emits rewind_failed with the reason no active generation to snapshot.
  • Success emits snapshot_saved carrying the assigned index, the chunk it captured, and the snapshot it descends from.
Example:

rewind

Restore a snapshot saved with save_snapshot. The model returns to that point in the video and keeps generating from there. Parameters: Behavior:
  • The restore lands at the next chunk boundary, after the in-flight chunk finishes. The stream is never torn mid-chunk.
  • The prompt is not restored. rewind rolls back the latent history, the RNG state, and the chunk index, and nothing else. Whichever prompt is active keeps steering the restored scene. To land back where you were instead, re-send the prompt that list_snapshots reports for that snapshot.
  • snapshot_index: 0 never matches anything, because indices start at 1.
  • The restored snapshot becomes current_snapshot_id, so the next save_snapshot branches off it.
  • Generation must be running and the buffer must hold the target, otherwise the command emits rewind_failed. See Rewind failures for the reasons.
  • Success emits a state snapshot with current_chunk moved back and the new current_snapshot_id, followed by rewind_complete. The state arrives first, so a handler awaiting the acknowledgement already holds the state it refers to. current_frame does not move back: it counts every frame the session has emitted, so it keeps climbing across a rewind.
Example:

list_snapshots

Read the contents of the rewind buffer. The reply is a snapshot_list message. Parameters: None. Behavior:
  • Always succeeds. An empty buffer returns snapshots: [].
  • This command is the only way to read the buffer’s contents. Call it when generation starts, then again on every snapshot_saved. The state payload reports which snapshot the generation descends from in current_snapshot_id, so pair the two: list_snapshots for what exists, current_snapshot_id for where you are within it.
  • Entries come back oldest first. An evicted snapshot drops out of the list, which makes the reply the authority on what can still be rewound to.
Each entry in snapshots is an object: Example:
The rewind buffer belongs to the live session. It holds up to 50 snapshots, evicts the oldest without warning, is emptied by reset, and is released when the session ends. Treat it as a way to move around inside the take you are working on, not as session history you can store and come back to later.

Messages from model

Listen for messages with reactor.on("message", ...) (imperative) or the useReactorMessage() hook (React). Every message is delivered as JSON { "type": "<name>", "data": { … } }. schedule_prompt is the one exception to the conditions_ready rule. It stays silent on readiness, because a prompt queued for a future chunk isn’t active yet. rewind_failed covers both rewind commands, so it carries no command field. When one handler drives both save_snapshot and rewind, track which one you sent to word the error. See Rewind failures. In chunk_complete, frames_emitted counts the frames in that one chunk, always 33. For the session running total, read current_frame from the state snapshot.

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 the individual messages above yourself. state reports which snapshot the generation descends from, not what the buffer holds. Read the contents with list_snapshots. Example handler:

Errors

Commands fail in two distinct ways, and each surfaces differently.

Rejected by the model

A command whose preconditions fail reaches the model and comes back as a command_error message. Nothing mutates, and no state snapshot follows, so a UI driven off state alone shows no sign that anything happened. Subscribe to command_error as well.

Rejected as invalid input

Three commands carry values the schema constrains. Helios rejects anything outside these bounds rather than clamping it, and the rejection arrives as an invalid-input error rather than a command_error naming the command. Validate at the edges of your own UI, such as a slider pinned to 01.

Rewind failures

save_snapshot and rewind do not use command_error. They report failures on their own rewind_failed message, which carries a reason and no command name.

Complete example: prompt sequence

Complete example: image-to-video

Use a reference image to guide generation. Upload the image first, then send it together with the prompt via set_conditioning before starting, so the very first chunk is conditioned on both.

Complete example: save and rewind

Mark a moment worth returning to, try a direction, then back out of it and try another. The pattern to notice is the pairing at the end: rewind restores the latents, and the set_prompt that follows supplies the prompt, because rewinding does not restore one.