Tracks
Commands
Commands with a named reply return that correlated message.play and stop declare acceptance
without a response payload; their events report playback changes. command_error reports a refusal
without changing queues or defaults. valid_commands reflects session state, but arguments still
need validation.
enqueue
Supply a nonempty prompt and either reference_image or reference_images, not both. Each clip
retains its own prompt and ordered references. References guide appearance rather than fixing the
first or last frame. Empty text, invalid or missing images, invalid parameters, and a full
generation queue produce command_error.
To continue a scene, set
continue_from_clip_id to a clip that has finished generating. Motion,
camera, and audio carry across the boundary while the new clip’s own references guide its
appearance.
Replies clip_queued and broadcasts queue_update and state_update. Completion emits
clip_generated when the clip enters the playout queue.
move
A running build is unaffected. Replies
clip_moved with the resulting queue and position and emits
queue_update. Invalid positions produce command_error.
pop
Replies
clip_popped and emits queue_update and state_update. A running build finishes but its
result is discarded. Use stop for a playing clip.
play
Consumes the ready clip and emits
clip_started, queue_update, and state_update. Refuses when
already playing or when no matching ready clip exists.
stop
Send {} to cut playback. Emits clip_stopped and state_update; queues remain intact. Under
autoplay, this skips to the next clip. Refuses when nothing is playing. A stopped clip cannot
resume.
set_seed
Replies
seed_accepted and emits state_update. Explicit per-clip seeds do not advance this
default. Invalid seeds produce command_error.
set_clip_seconds
Replies
clip_length_accepted with the actual clip_seconds and frames, and emits
state_update. Only future enqueues use the new default; queued clips keep their lengths. Invalid
lengths produce command_error.
set_canvas
Both queues and playback must be empty. Replies
canvas_accepted and emits state_update.
Unsupported aspects and nonempty sessions produce command_error.
set_autoplay
Empty queues wait; autoplay does not generate prompts. Replies
autoplay_accepted and emits
state_update.
set_flush_on_clip_end
With flushing off, the playback clock carries across ready autoplay clips. This does not guarantee
visual continuity. Reset always clears tracks. Replies
flush_accepted and emits state_update.
get_queue
Send {} at any time. Replies queue_update with the complete generation and playout queues.
history is always empty: a played clip is not listed and cannot be replayed. To continue from a
generated clip, pass its ID as continue_from_clip_id on the next enqueue.
get_state
Send {} at any time. Replies state_update with defaults, capacities, playback progress, and
valid_commands.
reset
Send {} to drop both queues, cut playback, restore defaults, and clear tracks. Replies
session_reset; emits queue_update, state_update, and clip_stopped if playing. In-flight
results are discarded.
Messages
All listed payload fields are required.
queue is a string identifying generation or playout;
position is the resulting integer index, with zero at the front. reason and command are
strings. seconds_sent is a number measuring the session total, not the duration of one clip.
seed, frames, width, height, and cleared_clips are integers; clip_seconds is a number,
aspect is a string, and enabled and was_playing are booleans. cleared_clips counts clips
removed from both queues, excluding the playing clip. was_playing includes an armed or playing
clip.
Clip object
The same clip object appears in clip messages and queue arrays.queue_update
All three fields are required arrays of clip objects:
state_update
All fields are required, including the nullable playing_clip_id.