Skip to main content
ABot World Halo produces video and audio in a Reactor session. Send commands with reactor.sendCommand() or the typed SDK. This page describes the reactor/abot-world-halo contract. See the overview for a quick start.

Tracks

There are no input tracks. Attach both outputs before start. Browsers can block sound until the user interacts with the page, so give the user a control to start playback.

Session states

start moves idle to running. set_paused moves between running and paused. reset ends the session from any state and returns to idle with every input cleared. A session also ends when the client leaves. Commands come in two groups. capabilities in every state_update lists which group each command belongs to:
  • Session setup (set_first_frame, set_references, set_seed, set_resolution): set them in idle. They hold for the session and are refused with locked_while_running once it starts.
  • Live controls (set_move, set_look, set_action, set_prompt, set_paused): send them in any state. During a session, each change applies from the next chunk. The chunk being generated never changes.

Commands

Commands return no reply. Watch state_update to see each change take effect. When the model refuses a command, nothing changes and you get an error code. In JavaScript, sendCommand resolves undefined and the client emits error with operation: "sendCommand". In Python, send_command raises ReactorError. See Refusals for every code.

set_first_frame

Set the picture the video starts on. The first frame of the session is this image. An 832 × 480 image matches the output exactly. Any other size works too: at start the image is scaled to cover the output and center-cropped. The frame stays set for later sessions until reset or another set_first_frame.

set_references

Set how the playable character looks, with up to five pictures of it. The video does not start on these pictures. The model keeps the character’s look to them for the whole session. The call replaces the whole list, and [] removes every reference. Order matters. Send the pictures in this order: head, left, right, front, back. With fewer than five, keep that order. A picture is refused when its long side is more than twice its short side. A refusal keeps the previous list. See the prompt guide for how to prepare them.

set_prompt

Set the scene description in plain English. Leading and trailing whitespace is removed. An empty string is allowed. In idle, the prompt sets the scene for the next session. start needs one. During a session, a new prompt changes the scene from the next chunk, or from the first chunk after the new text is processed. Video already generated does not change. Each chunk_complete reports the scene it used in scene, so you can see when your change takes effect. A live prompt has a length limit. Once the first chunk is out, applied.scene_max_tokens in state_update gives that limit in tokens. Until then, a live set_prompt is refused with not_ready.

set_seed

Set the seed for the session’s randomness. The same inputs, seed, and controls give the same video. With -1, each start picks a new seed. To see the seed in use, read applied.seed in state_update or seed in generation_started.

set_resolution

Choose the output size by name. 480p (832 × 480) is the only size available. capabilities.set_resolution.values lists the sizes a session can serve. Any other name is refused with unsupported_value.

set_move

Walk the character relative to where it faces. Each axis is one held key: send the new value when a key is pressed or released. The value holds until changed, and the pace is the model’s own. Any other value, including a fraction, is refused with unsupported_value. Movement sent in idle applies to the first chunk. Movement sent while paused applies to the first chunk after resuming.

set_look

Turn the view. It works like set_move: one held key per direction, held until changed, and the turn rate is the model’s own.

set_action

Hold an action: what the character does beyond walking and turning. Actions work like keys. Send the action when it starts and none when it ends. The action held when a chunk starts is the one that chunk runs with, so a press lasts at least one chunk. The presets switch at once. A custom text is prepared the first time a session uses it, so that chunk takes longer. capabilities.set_action.presets carries each preset’s full text. A preset with text, or custom without it, is refused with unsupported_value.

set_paused

Hold the session. While paused is true, no video is generated, the picture stays on the last frame, and every input is kept. Set it before start to start held. The next state_update reports the change.

start

Begin a session from the first frame, references, prompt, seed, and resolution. Takes no parameters. A state_update with running follows at once. The session is built at the next step, so the first chunk takes longer. Then generation_started arrives and video and audio stream, with one chunk_complete per chunk. A session that cannot be built is reported after the call succeeded: a state_update back in idle carries error with code: "start_failed". Every input is kept, so you can fix it and call start again.

reset

End any session and clear every input to its starting value: no first frame, no references, no prompt, seed -1, 480p, no movement, no action, and not paused. Takes no parameters. The connection stays open, in idle. When a session was generating, generation_complete with reason: "reset" comes first, then state_update.
A session that ends with reason: "error" keeps its inputs, so start can run again. With seed -1 it draws a new seed.

Refusals

Schema validation can also report invalid_command before the model sees the call, for example for a value of the wrong type.

Messages

Base SDK messages arrive as { type, data }. Typed SDK handlers such as onStateUpdate receive the fields directly.

state_update payload

settings holds first_frame_set (boolean), references (a count), prompt (text, or null before set_prompt), seed, resolution, move (forward, right), look (yaw, pitch), action (name, and text for custom), and paused. applied holds seed (the seed in use, also when -1 was sent), resolution, move and look as applied to the last chunk, and action for the last chunk (name and text, or null before the first chunk). It also holds scene for the last chunk (text, live when it was set during the session, and tokens) and scene_max_tokens, the room for a live scene (null before the first chunk).

generation_started payload

chunk_complete payload

generation_complete payload

Complete example

The tutorial walks through a browser app that sets the inputs, plays the world with keys, holds actions, and changes the scene live.