Genie4Model from the typed SDK, @reactor-models/genie-4, to connect, start worlds, and
receive typed snapshots. The package also provides React hooks and components. See
Typed Model SDKs.
At a glance
Key features
Explore Worlds
Move with WASD and look around with the arrow keys.
Video and sound
Receive the world through separate video and audio tracks.
Change the scene
Send plain-language instructions while the world is live, including lines for a character to
say.
Quick start
Scaffold the example project withcreate-reactor-app. The
tutorial shows how to build a small app from scratch.
- npm
- pnpm
@reactor-models/genie-4. For your own browser code, install that package and
provide the token resolver. The media
controls let the user start playback if the browser blocks autoplay.
How it works
- Connect a Reactor session and attach both output tracks. Read the initial
getState()reply. - Call
startWorld()with a prompt, an uploaded image reference, or both. - Watch
state.phasemove fromstartingtolive. A successful start call alone does not mean the world is live. - Send the complete set of held keys on each change. Use
instruct()for changes to a live scene. - End the world with
endWorld(), or let its time limit expire. Start a new world with its inputs again.