Skip to main content
Use action controls to actuate an active Odyssey-3 stream while continuing to receive video. Use prompt interactions to change the scene or describe a world event. Both fit into the same stream lifecycle.

Send a complete input snapshot

Each call replaces the held keys and mouse buttons from the previous call. An empty snapshot releases held inputs. Mouse deltas apply once; they remain relative rather than becoming held movement.
The examples show successive input events; give the model time to generate frames between them. Sending press and release together can make the held interval too brief to affect generated video. I/J/K/L and look_key_level are display metadata. Convert your application’s look input into mouse_dx and mouse_dy to send camera movement to the model. Actions depend on the scene and subject; these controls do not promise a deterministic game-engine response. For a custom semantic map, use version_id: "action_controls_semantic_map/1", a nonblank mapping_id, and exactly these seven bindings: shift, e, f, mouse_left, mouse_right, space, and c. Each binding is a trimmed, single-line phrase of up to 96 characters; shift is a single impulse verb, such as jump. An optional active_subject identifies the subject. Use the exported ActionControls and ActionControlsSemanticMap types to construct these snapshots.

React to incoming video

For an interactive controller, keep the latest frame, choose the next input from that observation, then send a snapshot. Python exposes decoded RGB arrays through on_video_frame. In a browser, draw the video into a canvas from requestVideoFrameCallback to inspect incoming pixels. Run expensive vision or policy work outside the video callback, and discard stale observations rather than building an unbounded frame queue. A keyboard application can instead maintain a set of pressed keys, send that set on each key change, and send {} when the window loses focus. Prompt updates can run alongside this input loop through the existing interact() method. Await the prompt acknowledgement before issuing another prompt update.

Know what was observed

The returned integer is a locally sent sequence number, not a server or model acknowledgement. Incoming video can include buffered frames or repeats while generation is busy. A frame callback therefore does not itself acknowledge a new model generation or a consumed input. For an audit, retrieve the stream’s recording and read its events file as newline-delimited JSON. action_controls_consumed entries identify the model-consumed intervals, effective held state, input transitions, and source sequence watermarks. prompt_applied entries with phase: "model_bound" identify prompts bound to generation. end_stream() / endStream() sends a neutral snapshot before ending when you have used controls. Disconnect attempts the same release while the channel is open and then closes the connection. A broken transport cannot guarantee delivery of that final snapshot; ending the stream or connection also ends its control state.

Script the same controls in Simulation

Place controls in their own timestamped entries. Use a separate entry for a prompt change, even when it is near a controls update. Simulation accepts the movement keys above except the display-only I/J/K/L keys, and also accepts c where the assigned profile maps it. Omit look_key_level in Simulation scripts. Keep Simulation mouse deltas within −50 through 50; values outside those bounds are rejected at admission.
Poll the job until it reaches a terminal status, then download the raw video and events from the completed job. Treat generated duration, wall-clock processing time, account usage, and delivered resolution as separate measurements.