Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.reactor.inc/llms.txt

Use this file to discover all available pages before exploring further.

Alongside the video stream, your app and the model exchange data over a real-time channel. You control the model and receive feedback while it generates.
  • Commands are instructions your app sends to the model. They control what the model generates in real time.
  • Messages are updates the model sends back to your app. They report state, signal events, or deliver data.
For example, a video model might accept a set_prompt command to change what it generates, and respond with periodic state messages reporting the current frame number and active prompt.
Commands flow from your app to the model, messages flow back

Commands

A command is a named action with a payload.
await reactor.sendCommand("set_prompt", { prompt: "a forest at dawn" });
Every model defines its own commands with typed parameters. A prompt-driven model might expose set_prompt; a model with camera controls might expose move or rotate. Command names, parameter names, and types are all model-specific.
Commands can only be sent when the connection is in the ready state.

Messages

Reactor models can send structured JSON messages to your app at any time during a session. Each model defines its own message types.
reactor.on("message", (msg) => {
  console.log(msg);
});
For the full list of commands and messages per model, see the Model API Reference.