Skip to main content
Turn reference images into a sequence of clips with synchronized audio. This walkthrough starts within a connected Reactor session and covers uploading, queuing, and playback. See the schema for the full command reference.

Upload and enqueue

  1. Subscribe to main_video and main_audio. Read state_update for defaults, queue capacities, playback state, and valid_commands. Read queue_update for the full queues.
  2. If you need a different canvas, call set_canvas before adding clips, while both queues and playback are empty.
  3. Upload one to nine JPEG, PNG, or WebP images through the file upload flow.
  4. Call enqueue with a nonempty prompt and either one reference_image or an ordered reference_images list. Refer to list entries as Picture 1, Picture 2, and so on.
  5. Keep the clip_id from the clip_queued reply. The accepted clip also reports its seed, effective duration, and frame count. Use metadata for a client string you want echoed unchanged.
clip_queued acknowledges acceptance. Wait for clip_generated, or find the clip in queue_update.playout, before requesting playback.

Play and queue more

Call play with the ready clip’s clip_id, or send {} to play the front of the playout queue. clip_started reports when output starts. clip_finished reports when all video frames and synchronized audio have been sent. For automatic playback, call set_autoplay with enabled: true. Ready clips start whenever idle; an empty queue waits for more clips. Each new enqueue supplies its own prompt and references. Read generation_capacity and playout_capacity from state_update. A full generation queue rejects new enqueues. A full playout queue pauses building until room is available. valid_commands reflects current state, but command arguments still need validation and state can change before a request arrives.

Reorder or remove

Call move with a clip_id and zero-based position to reorder a clip within its current queue. A position past the end appends. Moving a clip does not affect a running build. Call pop with a queued clip_id to remove it. If its build is already running, the work finishes but its result is discarded. To cut a playing clip, use stop instead. It cannot be resumed. With autoplay enabled, stop skips to the next ready clip. To stop without starting the next one, disable autoplay before calling stop.

Handle failures and reset

command_error contains the refused command and reason without changing queues or defaults. clip_failed contains the failed clip and reason; that clip is removed and the queue continues. To try again, submit a new enqueue request with the desired prompt and references. Call reset to drop both queues, cut playback, restore defaults, and clear the tracks. Its session_reset reply reports cleared_clips and was_playing. In-flight results are discarded.