Skip to main content
A typed SDK is a per-model package that wraps the base Reactor class with named methods and React hooks mirroring that model’s published schema. It only adds ergonomics to aid in development, such as autocomplete, typed parameters, and named hooks. Every typed method ultimately calls sendCommand() on the base class. See the SDK Reference overview for when to reach for a typed SDK vs. the base class. Each package ships two layers: an imperative class and a React layer. The examples below use Helios; the other packages are identical with the names swapped, e.g. LongliveV2Model, LongliveV2Provider, useLongliveV2, LongliveV2MainVideoView (and the same pattern for LingBot, LingBot World 2 (LingbotWorld2Model / LingbotWorld2Provider / useLingbotWorld2 / LingbotWorld2MainVideoView), SanaStreamingModel / SanaStreamingProvider / useSanaStreaming / SanaStreamingMainVideoView, Visko Orbis Stable (ViskoOrbisStableModel / ViskoOrbisStableProvider / useViskoOrbisStable / ViskoOrbisStableMainVideoView), and X2Model / X2Provider / useX2 / X2MainVideoView), and XMAX X2.1 (XmaxX21Model / XmaxX21Provider / useXmaxX21 / XmaxX21MainVideoView), Pika H3 Flex (PikaH3FlexModel / PikaH3FlexProvider / usePikaH3Flex / PikaH3FlexMainVideoView), PixVerse R2 Director (PixverseR2DirectorModel / PixverseR2DirectorProvider / usePixverseR2Director / PixverseR2DirectorMainVideoView), PixVerse R2 Persona (PixverseR2PersonaModel / PixverseR2PersonaProvider / usePixverseR2Persona / PixverseR2PersonaMainVideoView), and Genie 4 (Genie4Model / Genie4Provider / useGenie4 / Genie4MainVideoView). Genie 4 sound uses useGenie4Track("main_audio") with an audio element. HappyOyster follows the same naming (HappyOysterModel / HappyOysterProvider / useHappyOyster) with one difference: you fix an experience mode at construction (mode: "adventure" | "directing"), and the mode selects between its two model names. For details, see the HappyOyster overview.

Imperative class

HeliosModel (and LingbotModel, LingbotWorld2Model, LongliveV2Model, SanaStreamingModel, ViskoOrbisStableModel, XmaxX21Model, Genie4Model) extends Reactor, so it keeps every base method (connect, disconnect, uploadFile, on, pauseTrack, resumeTrack, …) and adds a typed method per command. The model name is set for you.
Typed methods mirror the model’s commands one-to-one: helios.setPrompt(...) sends the set_prompt command. The canonical list of methods and their parameters is each model’s Commands table: Helios commands / LingBot commands / LingBot World 2 commands / LongLive-2.0 commands / SANA-Streaming commands / Visko Orbis Stable commands / XMAX X2.1 commands / Genie 4 commands. See also FastH3-Omni commands, Pika H3 Flex commands, PixVerse R2 Director commands, and PixVerse R2 Persona commands.
Non-React apps can import the class from the package’s ./core entry (@reactor-models/helios/core) to skip the React dependency. The default import includes both layers.

React layer

For React apps the package also exports a provider, hooks, and a typed video component.
  • <HeliosProvider> is <ReactorProvider> with modelName pre-set. Pass the same props (jwtToken, connectOptions, …) minus modelName. connectOptions accepts the full ConnectOptions set (autoConnect, maxAttempts, autoResumeTracks, sessionId, connectionId).
  • useHelios() returns the base useReactor store (status, connect, disconnect, sendCommand, uploadFile, lastError, …) plus a typed method per command (setPrompt, schedulePrompt, setImage, setSeed, setSrScale, setImageStrength, start, pause, resume, reset, and setConditioning on Helios 0.9.0+).
  • Per-message hooks are typed equivalents of useReactorMessage, each filtered to one message type, plus the catch-all useHeliosMessage. Helios exposes useHeliosState, useHeliosCommandError, useHeliosImageAccepted, useHeliosPromptAccepted, useHeliosConditionsReady, useHeliosChunkComplete, useHeliosGenerationStarted / useHeliosGenerationPaused / useHeliosGenerationResumed. LingBot mirrors these and adds useLingbotGenerationComplete and useLingbotGenerationReset. LingBot World 2 mirrors LingBot’s full set under the LingbotWorld2 prefix (useLingbotWorld2State, useLingbotWorld2CommandError, useLingbotWorld2ImageAccepted, useLingbotWorld2PromptAccepted, useLingbotWorld2ConditionsReady, useLingbotWorld2ChunkComplete, the useLingbotWorld2Generation* hooks including Complete and Reset, and the catch-all useLingbotWorld2Message). SANA-Streaming adds useSanaStreamingVideoAccepted, useSanaStreamingAnchored, and useSanaStreamingGenerationComplete / useSanaStreamingGenerationReset. Visko Orbis Stable mirrors the full lifecycle under the ViskoOrbisStable prefix (useViskoOrbisStableState, useViskoOrbisStableCommandError, useViskoOrbisStableImageAccepted, useViskoOrbisStablePromptAccepted, useViskoOrbisStableConditionsReady, useViskoOrbisStableChunkComplete, the useViskoOrbisStableGeneration* hooks including Complete and Reset, useViskoOrbisStableResolutionAccepted, useViskoOrbisStableAudioPromptAccepted, useViskoOrbisStableAudioEnabledAccepted, and the catch-all useViskoOrbisStableMessage). Payloads match the model’s Messages table. Pika H3 Flex has one hook for each of its messages, such as usePikaH3FlexClipGenerated, usePikaH3FlexStateUpdate, and usePikaH3FlexQueueUpdate, plus the catch-all usePikaH3FlexMessage. Its play and stop methods resolve undefined, and the other methods resolve their reply message. See the Pika H3 Flex commands. PixVerse R2 Director follows the same shape: one hook per message, such as usePixverseR2DirectorSessionState, usePixverseR2DirectorClipGenerated, and usePixverseR2DirectorClipFailed, plus the catch-all usePixverseR2DirectorMessage. Its createWorld, attachWorld, play, and stop methods resolve undefined. See the PixVerse R2 Director commands. PixVerse R2 Persona does the same with usePixverseR2PersonaSessionState, usePixverseR2PersonaTranscript, usePixverseR2PersonaQuestionReceived, and the rest, plus the catch-all usePixverseR2PersonaMessage. Its startCall resolves undefined, and PixverseR2PersonaModel adds publishMic(track) and unpublishMic() for the mic input track. See the PixVerse R2 Persona commands.
  • <HeliosMainVideoView> is <ReactorView> with track="main_video" pre-bound; it accepts the other ReactorView props. useHeliosTrack(name) returns a raw MediaStreamTrack for a named track. SANA-Streaming, which takes a live webcam as input, also ships <SanaStreamingCameraView>, a <WebcamStream> with the camera input track pre-bound that acquires and publishes the webcam for you.
Multiple clients can share one session. Adopt a backend-created session with connectOptions= {{ sessionId }} (or connect({sessionId}) on the class), and adopt a pre-registered connection with connectionId. With autoResumeTracks: false a client subscribes to a subset of output tracks and resumes them with resumeTrack(). See Sessions.

How typed names map to the base SDK

Worked examples

Each model’s reference page includes an end-to-end tutorial that uses its typed SDK throughout: Helios tutorial / LingBot tutorial / LingBot World 2 tutorial / LongLive-2.0 tutorial / SANA-Streaming tutorial / Visko Orbis Stable tutorial / FastH3 tutorial / Genie 4 tutorial. The FastH3-Omni tutorial, the Pika H3 Flex tutorial, the PixVerse R2 Director tutorial, and the PixVerse R2 Persona tutorial use the base SDK to show each model command directly. The EdenLive tutorial uses EdenLiveModel to play a built-in game and to stream a game of your own. The XMAX X2.1 tutorial covers source video, reference images, and four-frame drag control.