Skip to main content
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.
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.
Prefer typed methods over string commands? Models with a published typed SDK (like Helios or LingBot) expose every command as a typed method with autocomplete, parameter hints, and compile-time validation. No hand-written JSON, no string-typed command names.
Helios typed SDK
See Two layers: base SDK and typed SDKs for the full picture.
Commands can only be sent when the connection is in the ready state.

Replies and refusals

A command can answer with a reply, which the awaited call returns. A model can also refuse a command, for example when its queue is full. The refusal fails that call with a stable code and a message for your user, and reaches only the client that sent the command.
A model that refuses this way lists its codes on its schema page, as FastH3 does. See Replies and refusals for the details, including React and models that still broadcast a command_error message.

Messages

Reactor models can send structured JSON messages to your app at any time during a session. Each model defines its own message types.
For the full list of commands and messages per model, see the Model API Reference.