reactor/eden-live and send commands with reactor.sendCommand(). This reference lists
the media tracks, command parameters, and messages for a session. For a quick start, see the
overview.
Tracks
The model returns its source frames on
draft_video alongside the generated main_video. Use them
to compare the source and generated views.
With source: "client", each chunk uses the latest source_video frames. EdenLive scales them to
cover 1280 × 704 and center-crops them. The output plays at the rate your frames arrive. With
source: "game", EdenLive renders the selected game itself.
From connect until start, both outputs show the staged reference, or a black frame before one is
staged.
Session lifecycle
Connect with the base SDK, then choose a draft source and stage an appearance reference and prompt. Useselect_game to stage an official game cover and prompt with either draft source. Use
set_image to stage an uploaded reference while keeping the current prompt.
start creates a new world and resumes generation. It replaces any existing world, including a
paused one. Both sources require a non-blank prompt. Game source also requires a selected game.
Client source requires a staged appearance reference.
Pause before calling select_game or set_image. Both commands end the current world. set_prompt
takes effect from the next chunk and keeps visual history. It leaves a paused world paused.
set_source keeps visual history when you switch sources. Switching to game starts the selected
game from its opening. Before the first start, resuming with set_paused fails. If a game ends,
call start to create a new world. You can also switch away from game source and resume with
set_paused and paused: false.
In game mode, steer the game with set_keys and set_look. Pausing, switching sources, and an
outcome release both.
Commands are valid at any time unless a precondition below prevents them. If you press and release a
key before the game captures its next frame, that press can have no effect.
Commands
Usereactor.sendCommand() in JavaScript and React, or reactor.send_command() in Python. The
JavaScript method reports failures through the SDK error interface and resolves undefined. It does
not reject. Read reactor.getLastError() for the error. When EdenLive refuses a command, the
error’s code is one of the codes listed under that command, such as pause_required, and its
message says why. A successful reply contains the snapshot in reply.data.
Use the snapshot to update your controls. Verify video playback on both output tracks. The only
model message is state_update.
The examples assume a ready session. In React, call useReactor from @reactor-team/js-sdk inside
a component under ReactorProvider. Put awaited calls in an async event handler. The typed SDK,
@reactor-models/eden-live, wraps each command as a method, such as selectGame and setLook. The
tutorial shows error handling.
start
Creates a new world and resumes generation. It replaces any current world, including a paused one.
The same seed, appearance reference, and draft repeat a world. The first chunk arrives on
main_video and draft_video after the source delivers its draft frames.
Errors:
game_required: Game source has no selected game.image_required: Client source has no staged appearance reference.prompt_required: The prompt is blank.
set_keys
Replaces the full set of held keys for the next game frame EdenLive captures. EdenLive ignores the
keys while paused or when the source is client. A short press can fall between captured frames.
Check state_update and the output video to see which inputs took effect.
The schema declares no command-specific error for
set_keys. A paused world or client source
ignores the keys. With client source, your own game handles the keyboard.
set_look
Holds a look rate in the game, like a mouse turning the view. Each game frame applies the latest
rate until the next call replaces it, so send 0, 0 when the movement stops. The rate adds to the
arrow keys’ look, up to the game’s own turn speed. EdenLive ignores it while paused or when the
source is client.
The schema declares no command-specific error for
set_look. Values outside the range fail
validation.
set_image
Stages an appearance reference in place of the game cover. Pause the world before calling it. The
command ends the current world and keeps the current prompt.
Upload a PNG, JPEG, or WebP image at least 32 pixels wide and 32 pixels high, up to 25 MiB and 16
megapixels. When the world starts, EdenLive scales and center-crops the reference to 1280 × 704. Use
uploadFile and pass the returned FileRef to the command. A data URL cannot replace the upload
reference.
Errors:
pause_required: The world is not paused.game_required: Game source has no selected game.invalid_image: The file is empty, too small, too large, or undecodable.
set_paused
Pauses or resumes the current world. Pausing holds both draft and generation and releases held keys
and look. Resuming continues the same world. Use start when you want a new world.
Errors:
start_required: You tried to resume beforestart.game_ended: You tried to resume a game that reached an outcome.
set_prompt
Changes the scene description from the next chunk. The world keeps its visual history, so the look
changes gradually. A paused world stays paused. The reply gives the accepted prompt, and the output
video shows its effect. With source game, the reply can take about two seconds before a world
starts. Sending the current prompt again changes nothing and replies at once.
Errors:
prompt_required for blank text.
set_source
Chooses the draft source for start. In an existing world, the switch takes effect from the next
chunk and keeps visual history. Switching to game starts the selected game from its opening. After
a game ends, switch away from game source to allow a resume. The switch releases held keys and look.
Read the state in the reply, then check the output video for the source change.
Errors:
game_required when a started world switches to game before select_game.
select_game
Stages an official game with its cover as the appearance reference and its official prompt as the
scene description. Pause the world before calling it. The command ends the current world. The cover
and prompt can also style client video. With source game, the reply arrives once the game is
loaded, about two seconds later, so a start after the reply begins at once.
Errors:
pause_required while a world plays.
Messages
Replace the displayed state with each complete
state_update snapshot. Clear it when you
disconnect. Use these snapshots as the source of state instead of reconstructing it from transition
events.
StateUpdate payload
game_state, outcome, health, health_max, and events describe the game. They are empty or
null with source client and before a world’s first chunk. Every state_update repeats events
until the next chunk, so add them to a log once for each new chunks value.
Complete example
The following sequence starts a built-in game with the base SDK. Configurereactor as in the tutorial and wait for
ready. This sequence pauses the world, selects freeze, and starts a new world with the game as
its draft source. The example logs the state from accepted commands. Keep the message and track
handlers from the quick start active to display subsequent snapshots and video.
JavaScript