- JavaScript
- React
- Python
Connect to a real-time world model with the imperative
Reactor client and render frames into a
<video> element. By the end of this guide you’ll have real-time AI video streaming wired into your app.Prerequisites
- Node.js 18+
- A Reactor API key
Mint a token on your server
Exchange your API key for a short-lived token on the server so the key never reaches the browser:For more information, see Authentication.
token.ts
Connect and render frames
Create a
Reactor object, attach the model’s video track to a <video> element, then connect with the
token from your server. Helios stays idle until it has a prompt and a start command, so send those
once the session is ready:main.ts
Run your app
Serve the page and open it in your browser.
The
<video> element starts playing once the track arrives, and real-time AI video streams to your
page. Try editing the prompt to steer what the model generates. See the
Helios reference for the full set of commands.Next steps
Authentication
How to set up secure, production-ready auth for your app.
Using the SDK
Connect, send commands, receive video, and publish input from JavaScript, React, or Python.
Helios model
All available commands and the messages Helios emits.